72
Apache2.0.58 PHP5.1.4 MySQL WinXP
------------------------------------------------
I went around and around trying to resolve why PHP works properly with Apache, mySQL works fine and can create accounts and databases using MySQL Administrator and Query Browser but PHP wouldnt connect properly to mySQL. Finally, going to MySQL website, it was noted to use the MySQL dll's from them that they packaged in php_5.1.4_mysql_4.1.19-win32 which has the latest in libmysql.dll and php_mysql.dll. These files are to be put into the C:\php directory (or where ever you put them) , Apache httpd.conf needs to have the following entries:
PHPIniDir "C:/php"
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
The PATH to PHPIniDir has to be put up front before the Loadmodules in the httpd.conf. Next. THIS IS THE MOST IMPORTANT THING TO DO!!:
You Must Put The PATH of the c:\php in the Windows environment path by appending it to the end as explained here:
http://us2.php.net/manual/en/faq.installation.php#faq.installation.addtopathAnd REBOOT Machine! And not simply log out. I suspect most ISP's do not know to add to the windows PATH so they figure since php works except for mySQL that something is wrong with php or MySQL and dont want to tackle the problem. So, if you are not serving your own MySQL and PHP, tell them to put the PHP directory in their Windows Path and Reboot Server. Good Luck!