N/APosted on - 11/27/2013
My MySQL extension of PHP is not working. I have PHP5-MySQL installed and when I try to connect through a web server powered by Apache, it doesn't run. May I know what reason is behind this? What can be done to solve this problem?
MySQL version of PHP not working
This problem occurs often if the file extension .php is not included in the Apache server’s httpd.conf file.
If you have installed PHP first and then Apache, then the installation wouldn’t have set the correct configuration settings.
Install Apache first
Now install PHP5. It will give you the option to set it up with Apache
The following are the 3 lines you will need to add to the httpd.conf file in Apache’s installation directory:
LoadModule php5_module "c:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php
# the path should point to the location of php.ini
Save the file httpd.conf
Open a web browser and try to test a PHP file