Mar 22 2007

How to Install MySQL 5 on a fresh Centos Install

Tag:tepezcuintle @ 18:02

Messing with MySQL 5

After installing centos 4, I wanted to install MySQL 5 to see how it works on a fresh install
of Centos. yeah, I know it should work but I have never done it before so here are the steps
to install MySQL 5 on a fresh centos 4 machine.

I went to the MySQL website and looked for the Redhat Enterprise 4 rpm files. here is a list of the
available stuff they have.

Continua”How to Install MySQL 5 on a fresh Centos Install”


Mar 09 2007

How to manually update Daylight Savings Time US update. Redhat 7.3 and up

Tag:tepezcuintle @ 18:35

Original Link

Also from IBM.

Let’s see if I can make this a little simple. I have just finished updating my Red Hat 9 servers, Fedora 6 notebook and all my Windoze machines.

Let’s start off by clearing up some misconceptions. NTP only sets the UTC time on the computer, the timezone files will display this time in the correct time zone for your region.

Newer, supported distros will have glibc updates ready for the timezone change. Un-supported distros as in Red Hat 9 need a little work.

On my servers, I used

#zdump -v /etc/localtime | grep 2007

to verify the 2007 timezone settings. Mine showed April 1st as the date of change… and not March 11.

I went to http://www.twinsun.com/tz/tz-link.htm and downloaded tzdata2006p.tar.gz. I un-tared this file into a temp directory and executed

# zic -d /tmp/zoneinfo northamerica

to compile the timezone data files. I then copied the EST5EDT file to /usr/share/zoneinfo/ directory and America/Montreal file into /usr/share/zoneinfo/America directory. Doing a quick test will make sure these new files are good.

# zdump -v /usr/share/zoneinfo/EST5EDT | grep 2007
# zdump -v /usr/share/zoneinfo/America/Montreal | grep 2007

lastly I linked the localtime file

# ln -fs /etc/localtime /usr/share/zoninfo/EST5EDT
# zdump -v /etc/localtime | grep 2007

the expected output should look a little like thi

/etc/localtime Sun Mar 11 06:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 EST isdst=0 gmtoff=-18000
/etc/localtime Sun Mar 11 07:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 EDT isdst=1 gmtoff=-14400
/etc/localtime Sun Nov 4 05:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 EDT isdst=1 gmtoff=-14400
/etc/localtime Sun Nov 4 06:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 EST isdst=0 gmtoff=-18000

Hope this helped.

BTW, If you want to update Windoze,I used tzedit.exe to get this to work.

Scott

Continua”How to manually update Daylight Savings Time US update. Redhat 7.3 and up”


Mar 08 2007

A Newbie Guide to Cron

Tag:tepezcuintle @ 20:03

This file is an introduction to cron, it covers the basics of what cron does,
and how to use it.

What is cron?

Cron is the name of program that enables unix users to execute commands or
scripts (groups of commands) automatically at a specified time/date. It is
normally used for sys admin commands, like makewhatis, which builds a
search database for the man -k command, or for running a backup script,
but can be used for anything. A common use for it today is connecting to
the internet and downloading your email.

Continua”A Newbie Guide to Cron”


Mar 06 2007

Windows XP and Wireless unable to get IP address

Tag:tepezcuintle @ 21:49

If you ever have problems with Windows XP and a wireless card unable to get a DHPC address and you get
and error like this one.

10106 The requested service provider could not be loaded or initialized.

the solution is to reset the winsock catalog. Using netsh.

Reset the winsock using the command “netsh winsock reset catalog” (without quotes).

That will fix your problem.

Continua”Windows XP and Wireless unable to get IP address”


Mar 03 2007

Renaming admin folder breaks Oscommerce with googlecheckout

Tag:tepezcuintle @ 3:47

For security reasons the Oscommerce developers recommend to change the name of the admin folder. Usually, it is a matter of changing the name of the folder and updating the name on the admin/includes/configure.php

When we did that on one of our shopping carts the site broke. Because of my recommendation I caused the site to break, and made the programmer spend a lot of time trying to fix the site.

I tried to figure out what cause their problem after renaming the admin folder, I figured that there was a reference to the old admin directory somewhere on the oscommerce files.

I couldn’t find the file on the Oscommerce files so I decided to try a recursive grep for the word admin on the Oscommerce directory .

Continua”Renaming admin folder breaks Oscommerce with googlecheckout”


Mar 02 2007

How to Troubleshoot connectivity problems MySQL

Tag:tepezcuintle @ 3:53

If you encounter problems when you try to connect to the MySQL
server, the following items describe some courses of action you
can take to correct the problem.


Mar 01 2007

Enable PHP error log with htaccess files

Tag:tepezcuintle @ 22:38

Here is a quick reminder on how to enable the php error log using htaccess files.

If you suspect that your php applications are dying or creating errors and you want to collect that data for debugging do the following.

inside the directory where you have your php scripts create an htaccess files

pico -w .htaccess

enter the following.

php_flag log_errors on
php_value error_log errorlog.txt

save the file . then create the file that will store the error.

touch errorlog.txt

then you might have depending on your setup make it writeable by the apache user or whatever user is running
apache on my server the user is nobody

chown nobody:nobody errorlog.txt
you might not have to do that on your server so it is trial an error.

Then so make sure your error is turned on you need a way to verify that it is working .

Create the following file.

print("The next line generates an error.
“);
printaline(”PLEASE?”);
print(”This will not be displayed due to the above error.”);
?>

save the file.
if everything is working access that file using your browser

http://www.yoursite.com/generate.php

hit refresh a few times so the page generates more errors to the log file.

in the mean time, you will see the following being displayed on the browser.

The next line generates an error.

now let’s check to see if your errorlog.txt file has any juicy info :) ( if you don’t see anything chown apache:apache the errorlog.txt file .

if you look at that file you will see the following.

[01-Mar-2007 17:34:17] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:25] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:26] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:27] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:27] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:27] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:27] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:27] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:27] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:28] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:28] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3
[01-Mar-2007 17:34:28] PHP Fatal error: Call to undefined function printaline() in /www/htdocs/your-directory/mytestphp/generate.php on line 3

ok, that is all for today fellow penguin readers.
We will come back again with more useless tips for you :)


Mar 01 2007

IP Subnetting made easy

Tag:tepezcuintle @ 22:18

Takeaway:
IP network engineers need a solid understanding of how IP subnetting works–yet the subject is often taught so poorly, students wind up completely baffled. George Ou has developed a simple, graphical approach that explains IP subnetting in a way that finally makes sense.

Continua”IP Subnetting made easy”