I just upgraded from PHP 4.0.3 to 4.0.6 using the .pkg and all seemed to go fine until I tried to look at sites using MySQL. It seems the PHP pages no longer conect to MySQL. I added the extention=mysql.so line to php.ini as mentioned on the pkg.nl.conalt.com site but I still get connection errors on all sites that use MySQL.
MySQL was installe din the /home directory becasue of space contraints and I think this may be the cause of the problem but I donlt know how to fix this and I have customers that are not too happy right now.
Any assistance would be greatly appreciated.
I would recommend you to compile php yourself. It isn't that hard. Just download it and install with
./configure bla bla bla
make
make install
Example line for configure (working on a raq4i) :
./configure --libdir=/usr/local --with-apxs=/usr/sbin/apxs --enable-safe-mode --enable-magic-quotes --enable-track-vars --with-regex=system --with-pgsql=shared --disable-debug --with-interbase=shared --with-ldap --enable-xml --with-mysql --enable-ftp --with-imap
Questions? Icq me at 78921497 or MSN jongetje4@hotmail.com.
PHP is working but there is a glitch somewhere. Now I just noticed that I can get everything to work if I replace localhost with 127.0.0.1 in the various php config files for the sites accessing MySQL dbs. Doing this seems to solve the problem but I have a lot of customers that all have config/global files set to localhost as their hostname and would prefer to find another solution than to tell them all to modify their scripts to accomodate my upgrade.
If I keep localhost as the hostname I get the following error message:
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/sites/home/web/phpMyAdmin/lib.inc.php on line 255
Before or after the PHP upgrade there never was a /var/lib/mysql directory. I created one and tried making sym links to where I could locate other mysql.sock files and that did not seem to work either.
Comments from any one having experienced something similar would be appreciated.
In your /etc/hosts you should see a line like :
127.0.0.1 localhost
If its not, add it.
That line OK if in the /etc/host file and localhost works OK for Perl/MySQL combinations. it is only with this new PHP version that I need to use the IP instead of localhost as the hostname. It must be a PHP configuration issue.
netastic
01-24-2002, 11:25 AM
i have had a world of problems with upgrading PHP on my RaQ4. I have since been contracting Jeff Ball, zeffie@zeffie.com to recompile and otherwise fix my PHP problems. i still have some page cannont be desplayed errors with my PHP sites but everything else is fixed. he recently upgraded my RaQ4 to PHP 4.1. his rates are very reasonable.
mirage
01-24-2002, 12:03 PM
I have had this problem numerous times. Please check out this link. I've found that site extremely valuable with their step by step instructions on everything raq
http://www.uk2raq.com/raqfaq/raqfaqshow.php?faq=43