Home > Backend Development > PHP Tutorial > Detailed explanation of the process of installing Apache 2.4 and PHP 5.4 on Window 7/XP_PHP Tutorial

Detailed explanation of the process of installing Apache 2.4 and PHP 5.4 on Window 7/XP_PHP Tutorial

WBOY
Release: 2016-07-21 15:10:39
Original
980 people have browsed it

1. Download address
Apache 5.4 —— httpd-2.4.4-win32.zip
PHP 5.4 —— php-5.4.15-Win32- VC9-x86.zip
Note that the PHP and Apache connector DLL are already included in the VC9 thread-safe version, so there is no need to download this DLL.
2. Configuration
1. Apache
Use any editor to open the apache2.4/conf/httpd.conf file to start configuration .
1.1 Set Apache location

Copy code The code is as follows:

ServerRoot "D:/ Program Files/apache2.4"

1.2 Enable the used modules
I only removed the comment of the mod_rewrite module.
1.3 Add the following content under the module content
Copy the code The code is as follows:

LoadModule php5_module "D:/Program Files/PHP5.4,php5apache2_4.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
AddHandler application/x- httpd-php .php
PHPIniDir "D:/Program Files/PHP5.4"

1.4 Modify the server administrator email address
Copy code The code is as follows:

ServerAdmin info@yoursite.com

1.5 Modify the document root directory
Copy code The code is as follows:

DocumentRoot "E:/www"


1.6 Find the actual path to replace the content
Copy the code The code is as follows:

ScriptAlias ​​/cgi-bin/ "D:/Program Files/apache2.4/cgi-bin/"


1.7 If you want to enable .htaccess, please modify the content under
Copy the code The code is as follows:

AllowOverride All

1.8 Add index.php to the index directory
Copy code The code is as follows:

DirectoryIndex index.html index.php

2 . PHP
1.1 Rename php.ini-development to php.ini
1.2 Modify extension path
Copy code The code is as follows:

extension_dir = "D:/Program Files/PHP5.4/ext"

1.3 Cancel Comment the following lines
Copy the code The code is as follows:

extension=php_curl.dll
extension=php_mysql .dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_soap.dll

1.4 If you use PHP’s email function, please modify the following content
Copy code The code is as follows:

SMTP = smtp.yoursite.com
smtp_port = 25
sendmail_from = youremail@sender.com

1.5 Finally set the time zone
Copy the code The code is as follows :

date.timezone = PRC

3. Installation
You need to install the Apache 2.4 service into the system service, start- >Run, enter cmd, and then enter according to the line:
Copy the code The code is as follows:

cd D:/Program Files /apache2.4/bin
httpd.exe -k install -n "Apache24"

Write an index.php file with the content of , start the apache service, and visit the following http://localhost/

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327100.htmlTechArticle1. Download address Apache 5.4 —— httpd-2.4.4-win32.zip PHP 5.4 —— php-5.4 .15-Win32-VC9-x86.zip Note that the VC9 thread-safe version already includes PHP and Apache connector DL...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template