Home  >  Article  >  Backend Development  >  Apache2.4+PHP5.6+MySQL5.6 integrated configuration

Apache2.4+PHP5.6+MySQL5.6 integrated configuration

巴扎黑
巴扎黑Original
2016-11-11 11:10:001259browse

1.Apache installation

Modify the http.conf file under the Apache24conf folder:

(1) Modify the root path of ServerRoot Apache

The default is ServerRoot "c:/Apache24", modify it to: ServerRoot "D: /phpEnv/Apache24" (that is, the folder where you decompressed it)

                                                                                                                                         to “ServerName” Needed for Apache. O (3) Modify the main folder directory interviewed by Documentroot Apache (ie PHP, Power Place where HTML code files are placed)

Apache's default path is below HTDOCS (D: PHPENVAPACHE24HTDOCS). File index.html. This path can be modified by yourself, you can configure it in my own new folder, and configure the httpconf file to the new folder

                                              Modified to:

               DocumentRoot "D:phpEnvwww"

                                                                                                                                                                                                                                                                                                DirectoryIndexindex .html

为 Modified to

DirectoryIndex index.php index.htm index.html

(5) Set the directory of the serverScript

scriptalias/CGI-BIN/"C:/Apache24 /cgi-bin/"change to => scriptalias/cgi-bin/" d:/phinv/Apache24/CGI-BIN "

Allowoverride None

options none

Require All Granter

Allowoverride None

Options None

Require All Granted

(6) Test Apache Environment

Run, enter CMD, and open the command prompt. Then enter the D:phpEnvApache24bin directory and press Enter httpd and press Enter

If no error is reported, you can test it (keep the command window open).

Access the index.html file in the DocumentRoot Apache folder. If "it works" appears, the service is installed and started correctly. In (6) Configure the Windows service. The new command window enters the Apache24bin directory and knocks into the code line: httpd.exe -k install -n "servicene". ServiceName means that the service name is modified by itself, such as "Apache24".

2. PHP5.6 installation

1. Copy the php.ini-development file in the directory and rename it to php.ini. It is the configuration file of php

2. Add php support to the Apache service

   "
           AddType application/x-httpd -php .php .phtml

3. Restart the service

                                                                                                                                                                                                              ,                                     herself herself she herself shepherds herself to shepherd she did herself to.修 4. Common configuration modification (modify pHP.ini file)

(1) time zone configuration: date.timezone = asia/safehai

(2) MySQL database support: extension_dir = "EXT", remove the previous ";" And change extension_dir = "D:phpEnvphpext" to turn on PHP extension support (the ext folder contains files that support many PHP extensions).

                      Remove the ";"                                                                                                                                                                 dll

                                                                 can support the mysql database by restarting the service.

Statement:
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
Previous article:php file operationsNext article:php file operations