Tuesday, July 6, 2010

Integrate Apache,PHP,Mysql on Windows

Follow these steps:

To install Apache:
  1. Downlaod the latest version of apache server for windows from
  2. Downlaod the .exe file instead of binary
  3. Run the installer.
  4. On the "Network Domain" and "server name" put "localhost"
  5. Put your emailid
  6. Then choose the default recommendatios.
  7. If you are choosing "Custom",then you can choose the options you want to keep and it will affect your httpd.conf file.
  8. Once done, you can test whether apache server is running by typing: http://localhost/ on browser and it will show a default html message as "It works".
To install PHP:
  1. Download the latest version of php for windows from
  2. I normally download the binary but you can download the installer and run.
To install mysql:
  1. Download the latest version if mysql from
  2. You can aslo download Mysql AB Query Browser as well as Mysql Adminstrator.
To integrate PHP,Mysql with Apache:
  1. Open your httpd.con file.
  2. Change the Document root to the working directory path where you will have all your project files.
  3. The same path should be for where it is mentioned Optionss Indexes FollowSymLinks
  4. Add index.php in "DirectoryIndex" filles, it will become DirectoryIndex index.html index.php index.html.var
  5. Where you have all the Add-type listed, add at the end "AddType application/x-httpd-php .php"
  6. At the very end of you conf file add PHPIniDir "full path to folder where php.ini file exists"
  7. Add LoadModule php5_module "path to/php/php5apache2.dll" (where php is installed, like c:/proram files/)
  8. If you are using PHP 5.2.x series then load php5apache2_2.dll
  9. Save the file
  10. Open php.ini file, and uncomment the extensions that you want to keep like mysql,openssl,curl etc
  11. To integrate with mysql, we need to move libmysql.dll as well as libmysqli.dll under windows/system32 folder.
  12. Restart the server.
  13. Check you configurations using phpinfo();

1 comment:

  1. Thanks, This information is very helpful.