This article mainly introduces how to install PHP, MySQL, Apache and how to configure them to work together in a Windows system environment.
If you use the Apache server, we recommend that you use vc6 thread safe PHP.
If you use the IIS server, we recommend that you use PHP of the safe version of vc9 thread.
If you are using a PHP version later than php5.2, note that PHP has made some changes to the Service's extended functions. That is to say, you have to adjust the installation methods of PHP and extensions.
There are two major adjustments: In php5.2 and later versions, the php. ini file does not need to be added to the Windows directory. Second, database files such as MySQL extensions
C: \ PHP \ libmcrypt. dll should be copied to the C: \ PHP \ ext directory, instead of copying to C: \ WINDOWS
\ System32.
For detailed installation steps, see the following:
1. Decompress php5.2.x to your installation directory, such as c: \ PHP.
2. Add the following code to the HTTP. conf file of Apache configuration file:
Loadmodule php5_module "C:/PHP/php5apache2_2.dll"
Addtype application/X-httpd-PHP. php
(Apache can load PHP in modules ).
Find <ifmodule dir_module> </ifmodule> and add the code to the module to change it to <ifmodule
Dir_module> directoryindex index. php index.html </ifmodule>
3. In the Apache configuration file HTTP. conf, add the following code: phpinidir "C:/PHP" (specify the directory of the php. ini file ).
4. Rename the PHP.INI-DIST to PhP. ini and edit the c: \ PHP. ini file:
Find extension_dir = "./" and change it to extension_dir = "C: \ PHP \ Ext ";
Find; Extension = php_mysql.dll, remove the semicolon;
Find; Extension = php_mcrypt.dll, remove the semicolon;
Find; Extension = php_mbstring.dll, remove the semicolon;
5. Now is the most important step. Please note:
Copy c: \ PHP \ libmysql. DLL to the C: \ PHP \ ext directory to support MySQL extension libraries;
Copy c: \ PHP \ libmcrypt. DLL to c: \ PHP \ ext for the complete extension file;
6. Add httpd. conf to the configuration file of apache2.2.
LoadFile c: \ PHP \ php5ts. dll
LoadFile c: \ PHP \ libmysql. dll
LoadFile c: \ PHP \ libmcrypt. dll
6. Restart the Web Service
7. For IIS users, the change content is the same as above. Copy the php. ini file to % ststemroot %.
8. After completing the preceding operations, restart the service.
All Rights Reserved