The content of this article is to share with you about the method of setting up the Apache PHP environment under Windows. Friends in need can refer to it
I often build a PHP environment under the Linux environment, but this is the first time under Windows. , there is no technical content, just record it, friends who need it can refer to this tutorial
I often build a php environment in the Linux environment, this is the first time under Windows, there is no technical content, I just record it, so as not to worry I'll have to search everywhere next time.
Download address
http://windows.php.net/download/#php-5.5
http://www .apachelounge.com/download/
http://www.microsoft.com/zh-CN/download/details.aspx?id=30679
V11 is a component of Microsoft, if not installed It will prompt that msvcr110.dll is missing.
After downloading, install V11 and unzip Apache and PHP to the directory you want.
Configuration
PHP configuration
PHP needs to configure environment variables. Add ;X:\php;X:\php\ext to PATH.
APACHE configuration
Modify the X:\Apache24\conf\httpd.conf file.
Need to modify:
ServerRoot "X:\Apache24" DocumentRoot "X:/Apache24/htdocs"Listen 8080 ServerName localhost:8080
Need to add:
# php5 support LoadModule php5_module X:/php/php5apache2_4.dll AddType application/x-httpd-php .php .html .htm # configure the path to php.ini PHPIniDir "X:/php"
Configure Apache, configure environment variables, install V11, and then you may need to restart the computer.
Start Apache
X:\Apache24\bin\httpd.exe -k install/start/stop/restart
Verify whether the Apache server is set up successfully, in the address bar Directly enter 127.0.0.1:8080. If the web page can be opened, it means Apache is successful. Verify whether PHP is configured successfully, create a new php file such as php.php, enter
and place it in the X:\Apache24\htdocs directory, and then use the browser Open 127.0.0.1:8080/php.php.
Related recommendations:
How to build a PHP running environment under Ubuntu server_Linux
Standard version of Eclipse to build a PHP environment Step by step method
The above is the detailed content of How to build Apache PHP environment under Windows. For more information, please follow other related articles on the PHP Chinese website!