MySQL version of PHP not working

Asked By 20 points N/A Posted on -


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?

Answered By 0 points N/A #199494

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.

  1. If you have installed PHP first and then Apache, then the installation wouldn’t have set the correct configuration settings.
  2. Install Apache first
  3. Now install PHP5. It will give you the option to set it up with Apache
  4. 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

PHPIniDir "C:/php"


  1. Save the file httpd.conf
  2. Open a web browser and try to test a PHP file


Login/Register to Answer

Related Questions