Computer Woes

Woes from advanced computer use - programming, open-source-undocumentatia, it-support-for-friends-and-family etc.

2004-04-05

More Fedora - PHP/MySQL/mmcache

Couldn't get mysql to work properly with PHP/Apache on the new box - just kept getting "Can't connect to local MySQL server through socket '/tmp/mysql.sock'". Since it was a 3.x mysql I thought I might as well upgrade it to 4.x and see if the problem went away by itself. Which it didn't of course. mysqld itself was running fine, no problems connecting to it using a terminal window etc.

Sometimes you should just pay attention to the error message. After turning off mysqld and getting the exact same php error message I finally figured out the error was that PHP just couldn't find the database server. Turns out /etc/my.cnf said socket=/var/lib/mysql/mysql.sock. Changing it to what PHP wants (/tmp/mysql.sock) fixed the problem.

Also found out (again) that turck mmcache, while a great program, doesn't install it's .so into the correct php extension dir (not according to my php.ini anyhow).

2004-04-03

Fedora IP address

Decided to finish a Fedora Core 1 installation I started a while ago. I've had trouble with it reverting to DHCP even though I've stated a static IP address and BOOTPROTO=static in /etc/sysconfig/network-scripts/ifcfg-eth0.

Finally found the problem on a message board. On boot, ALL files in /etc/sysconfig/network-scripts/ are processed, including my backup-file of the original eth0 config. Once I removed that, everything worked fine.