Description
1. In this case, the Apache version is HTTPD-2.4.20-X64-VC14 and the installation path is E:\Apache24
2. PHP version is php-5.5.34-win32-vc11-x64, the installation path is E:\php-5.5.34
Download
Login http://php.net/downloads.php Download PHP, because I want to integrate it with Apache, so I download here is the Thread Safe version;
Installation
1. unzip the downloaded file, this example I unzip the compressed package to the E-packing directory;
Configuration
1. Open the E:\Apache24\conf\httpd.conf file with a text editor and find #LoadModule vhost_alias_module modules/mod_vhost_alias.so and add the following configuration on its next line:
# load Phploadmodule php5_module "E:/php-5.5.34/php5apache2_4.dll" # to indicate the location of the PHP configuration file php.ini phpinidir "e:/php-5.5. 34 "
2. Find AddType application/x-gzip. gz. tgz and add the following configuration on its next line:
# defines the types of files that can execute PHP, that is,. php and. html files can execute PHP programs addtype application/x-httpd-php. php. html
3. The E:\php-5.5.34\php.ini-development renamed to E:\php-5.5.34\php.ini and opened the php.ini file with a text editor, to extension_dir = "./" Line , remove the comment and replace it with extension_dir = "E:/php-5.5.34/ext";
Extension_dir = "E:/php-5.5.34/ext"
4. Restart the Apache server;
Test
1. Write the test.php file and save the file to the Apache server's Web site path , the contents of the file are as follows:
2. Open http://localhost/test.php in the browser, when the following page appears, it means that Apache has supported the parsing of PHP files;
The above describes the configuration Apache server support PHP file parsing, including the Apache content, I hope the PHP tutorial interested in a friend helpful.