PHP Windows environment construction

Forehead. . There are a lot of resources on the Internet, I just write it here for my own memorandum. If I encounter a few problems in the middle, I will record it.
I have just been in touch with PHP for a long time and build my own environment
1. Apache version download problem
   Log in to http://httpd.apache.org/, download on the left, Files for Microsoft Windows. It is very clear on the official website that the official website only provides source code, not binary files. Interested students can download the source code and compile it by themselves, which will not be introduced here. Please note that what needs to be downloaded here is Apache Lounge (recommended by the PHP official website, as for ApacheHaus I have tested it many times, but it cannot start normally. It is inexplicable, and I do not want to continue tracking here). Unzip it.
2. Configure Httpd, and replace all the paths at the beginning of c: with their corresponding directories.
3. Start, there is ApacheMonitor.exe in the bin directory, which can be used for startup and shutdown control, or httpd.exe - k install adds the Apache service to the windows service list for unified management. Use httpd.exe -k uninstall to uninstall it.
4. Download php and go to the official website to download http://php.net/. Do not use php7 here, I will test it by myself I didn't pass, and the specific reasons were not analyzed. After all, I just came into contact with PHP for a long time, so I will think about some things later. You can download 5.5 or 5.6. There are some conditions for PHP on the left side of the stone downloaded
here . It is best to read the following. The requirement for Apache is to use Apache Lounge.
5. Configure the configuration of PHP, php.ini and environment variables. This is everywhere on the Internet. I am too lazy to say it.
6. Configure apache to know php, that is, add it in httpd.conf
# php5 support
LoadModule php5_module "D:/soft/php5.5.38/php5apache2_4.dll"
AddType application/x-httpd-php .php .html .htm
# configure the path to php.ini
PHPIniDir "D:/soft/php5.5.38"

7. Restart PHP

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326692142&siteId=291194637