PHP Environment configuration is more complex, the lack of any one may not guarantee the normal operation of the environment, I was configured for a long time to fix. Many tutorials on the web are problematic and pit a lot, so I'm trying to write one myself. Pre-stated that this environment configuration is a PHP 64 bit environment configuration under Windows. Talk to the chase. 1, download the Environment Profile Here's what you need to be aware of is that the PHP and Apache versions you download are based on your Windows system, and if you're 32-bit, download 32-bit Apache and PHP, If the 64-bit download 64-bit, here no longer repeat. The following is the official website of the corresponding document (please note the download after viewing the version): Apache2.4:http://www.apachelounge.com/download/ When downloading Apache2.4, note the VC14/VC11/VC10 tab in the upper-left corner and click on the appropriate tab to select the version of apache2.4 under the different versions of the runtime. I am under the VC11 version, of course, can also be under the VC14 version, of course, to install VC11 and VC14 of the runtime and nbsp , &NB Sp vc11-x64:http://www.microsoft.com/zh-cn/download/details.aspx?id=30679 , &NB Sp &NBSp vc14-x64:https://www.microsoft.com/en-us/download/details.aspx?id=48145 PHP5.6:http://windows.php.net/download#php-5.6 2, configure php unzip the downloaded PHP, create a new folder in the E-tray PHP, Copy all the extracted files to the e:\php\. Then add it in the system environment variable path, E:\php;e:\php\ext, restart 3, configure apache2.4 Extract the Apache24 folder from the downloaded package to E-drive (my e-drive, can also be extracted to any place, but the configuration of the directory should also be changed accordingly this time e disk will have a Apache24 folder, all Apache files are here. The next step is to configure: Notepad to open the e:/apache24/conf/httpd.conf file, "Modify ServerRoot" to find 37 lines of ServerRoot & nbsp; " C:/apache24 " Change to serverroot " E:/apache24 "(if you do not place the E-drive, put the corresponding path into your Apache24 's storage path, the same as " Modify Directoryroot " Modify the DocumentRoot as follows:
DocumentRoot "E:/apache24/htdocs"
<directory "E:/apache24/htdocs" >
Modify the Listen port to: Listen 80
"Modify ServerName" add the following lines to the file at the end of the ServerName localhost:80 "add PHP support" below the #ServerName www.example.com:80 line: # PHP5 support LoadModule php5_module E:/php/php5apache2_4.dll AddType application/x-httpd-php. php. html. htm # Configure the path to PHP.I Ni Phpinidir "e:/php" Missing Php5apache2_4.dll Reason: 1, may be you accidentally deleted, this possibility is very small; 2, you download the NTS version, re-download A TS version that has this DLL in it;
php5.6+apache2.4 Environment Configuration