PHP has been learning for some time, has not written about the development environment Building notes, now fill it up, because the steps to install the configuration is not very clear, draw on some other people's experience, summarized as follows:
First go to the official website to download the various software, download the required version:
Apache Download: http://www.apache.org/dyn/closer.cgi
MySQL Download: http://dev.mysql.com/downloads/
PHP Download: http://cn2.php.net/downloads.php
I chose the latest version because I did not consider a generic version of the environment because I had previously built it:
apache24,mysql5.5,php5.5.9
The installation steps are detailed below:
1. First install the software and install other software, like the installation of the line, preferably in the C packing directory, other directories can also, now assume that the installation path is as follows:
Apache C:\Apache24
PHP C:\php5.5.9
MySQL C:\Program files\mysql\mysql Server 5.5
2. Configure Apache
Open C:\Apache24\conf\httpd.conf, and at the end of the LoadModule list, add:
LoadModule php5_module "C:/php5.5.9/php5apache2_4.dll"
Phpinidir "c:/php5.5.9"
Find DocumentRoot, modify it to DocumentRoot "C:/apache24/htdocs" (your Web server root directory)
Find DirectoryIndex, modify to DirectoryIndex index.html index.php (here is the portal file to set up the website)
2. Configure PHP
In the environment variable path of the system, add: C:\php5.5.9; C:\php5.5.9\ext;
Change the file name of Php.ini-dist under C:\php5.5.9 to PHP.ini, open.
Find Doc_root, modify to Doc_root =c:\apache24\htdocs
Find Extension_dir, change to Extension_dir = "./ext"
Remove the semicolon ";" in front of the following modules: Extension=php_mysql.dll,extension=php_mysqli.dll,extension=php_gd2.dll.
This configures Apache and PHP, and then we can test for the success of the configuration:
In the Web root directory (such as my htdocs), build a file named index.php, which reads as follows:
<?
Phpinfo ();
?>
Restart the Apache service (restart to take effect each time the configuration is modified)
Open http://localhost/index.php with the browser, if you can see the PHP output configuration information can be used.