Tool raw material php-5.5.10-win32-vc11-x64.zip: windows.php.netdownloadhttpd-2.4.7-win64-VC11.zip: www.apachelounge.comdownloadmysql-5.6.16-winx64.zip: dev. mysql. comdownloadsmysql method step
Tool/raw material php-5.5.10-Win32-VC11-x64.zip: http://windows.php.net/download/ httpd-2.4.7-win64-VC11.zip: http://www.apachelounge.com/download/ mysql-5.6.16-winx64.zip: http://dev.mysql.com/downloads/mysql/ method/step
Tool/Raw Materials
- Php-5.5.10-Win32-VC11-x64.zip: http://windows.php.net/download/
- Httpd-2.4.7-win64-VC11.zip: http://www.apachelounge.com/download/
- Mysql-5.6.16-winx64.zip: http://dev.mysql.com/downloads/mysql/
Method/Procedure
1. 1
Install apache2.4.7(httpd-2.4.7-win64-vc11.zip)
1. Unzip the downloaded installation package: the httpd-2.4.7-win64-VC11.zip will put it in its own installation directory (My Directory D: \ phpEnv \ Apache24)
Steps
2. 2
2. modify the configuration file http. conf (D: \ phpEnv \ Apache24 \ conf \ http. conf)-open it with notepad.
(1)Modify the root path of ServerRoot Apache:
(37 rows) ServerRoot "c:/Apache24" changed to => ServerRoot "D:/phpEnv/Apache24"
(2)Modify ServerName your host name:
(Row 217) ServerNamewww.example.com: 80 remove the previous #. This attribute is required when Apache is started from the command line.
(3)Modify the directory of the main folder accessed by DocumentRoot Apache, that is, the location of php and html code files. The default path of Apache is under htdocs (D: \ phpEnv \ Apache24 \ htdocs.pdf, which contains a simple access file index.html. You can modify the path by yourself. Here, I will configure it in my new folder www (D: \ phpEnv \ www.
(Row 3) DocumentRoot "c:/Apache24/htdocs"
Change to =>
DocumentRoot "D: \ phpEnv \ www"
(4)Modify the configuration of the portal file: in general, we use index.php?index.html=index.htm as the portal for web projects. Only index.html needs to be added to the access port of apachetings. Of course, the settings of this entry file can be increased or decreased according to your own needs. If the requirements are strict, you can write only one index. php, so the entry in the project can only be index. php
(274 rows)
DirectoryIndexindex.html
Change to =>
DirectoryIndex index. php index.htmindex.html
(5)Set the serverscript directory:
(Row 3) ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" changed to => ScriptAlias/cgi-bin/"D: /phpEnv/Apache24/cgi-bin"
(6)(380 rows)
AllowOverride None
Options None
Require all granted
Change to =>
AllowOverride None
Options None
Require all granted
3. 3
3. Start Apache.
Start --- run, Enter cmd, and open the command prompt. Go to the D: \ phpEnv \ Apache24 \ bin directory and press Enter ,.
If no error is reported, you can test it (keep the command window open ).
Put index.html in the directory of Apache24 \ htdocs.html under the D: \ phpEnv \ www directory. "It works" appears when accessed by a browser. This means that apache has been correctly installed and started. You can also open a simple index.html file.
Steps
4. 4
4. Add Apache to the window Service Startup item and set it to start upon startup.
Close the httpd service first (close the command window)
Open a new command window and go to the D: \ phpEnv \ Apache24 \ bin directory:
The command to add the HTTP service is: httpd.exe-kinstall-n "servicename" servicename is the service name. What I add is: when the httpd.exe-k install-n "Apache24" command is successful, a prompt is displayed. You can view the Apache24 service in the window Service Startup item.
Click Start. If you do not want to set it to boot, you can change the start type to manual.
If you want to uninstall the service, stop the service first. Then, enter httpd.exe-k uninstall-n "Apache24" to uninstall the service.
Of course, you can also start Apache using apachemonitor.exe under D: \ phpEnv \ Apache24 \ bin.
The Apache configuration is complete.
Steps
END
Method/step 2
1. 1
Install php5.5.10(php-5.5.10-win32-vc11-x64.zip)
1. decompress the downloaded php-5.5.10-win32-vc11-x64.zip file to the installation directory (D: \ phpEnv \ php)
2. Copy the php. ini-development file in the directory and change it to php. ini, which is the configuration file of php.
3. Add php support for the Apache service
Open the Apache configuration file http. conf and add
# Php5 support
LoadModule php5_moduleD:/phpEnv/php/php5apache2_4.dll
AddType application/x-httpd-php .php.html. htm
# Configure thepath to php. ini
PHPIniDir "D:/phpEnv/php"
Here I add it under LoadModule
Make sure that the php5apache2_4.dll file exists in the php5.5 earlier version, but the file is already available in the later version. You can open the php installation directory to find the file.
PHPIniDir "D:/phpEnv/php". This is your php root directory.
Steps
2. 2
4. Restart the Apache server.
5. Test. Delete other files in www and create an index. php file. The content is Save. Accessing the php information indicates that php has been successfully installed.
Note:
Some common Php configuration changes: (D: \ phpEnv \ php. ini)
Time zone settings: date. timezone = Asia/Shanghai
Error Report Level: error_reporting = E_ALL, which can be enabled in development mode.
Steps
Method/step 3
1. 1
Install mysql5.6.16(mysql-5.6.16-winx64.zip)
1. Install mysql
64-bit mysql does not find the msi installation package. Therefore, extract the package to the installation directory, configure the related environment variables, modify the configuration file, and add the window service, this is not detailed here. Here I will post my configuration file for your reference:
[Mysqld]
Loose-default-character-set = utf8
Basedir = D:/program/mysql-5.6
Datadir = D:/program/mysql-5.6/data
Port = 3306
SQL _mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES
Character_set_server = utf8
[Client]
Loose-default-character-set = utf8
Note: basedir is the root directory of mysql and datadir is the data storage directory of mysql. I will not explain anything else.
After installing mysql, there is no graphical user interface. you can install software such as Navicat for MySQL, which looks more convenient.
2. 2
2. After installing mysql, add mysql support for php
Open the php configuration file php. ini (D: \ phpEnv \ php. ini)
(1) (721 rows); extension_dir = "ext", remove the previous ";" and change it to extension_dir = "D: \ phpEnv \ php \ ext "enables php extension support. There are many php extension support in the ext folder. dll file. If you are interested, you can take a look.
(2) then the mysql extension of php is enabled.
(Rows 875 and 876) Remove the preceding ";"
Extension = php_mysql.dll
Extension = php_mysqli.dll
Of course, you can also enable php_pdo_mysql.dll in line 1 to enable php's pdo support.
Note: There are a lot of expansion options between lines 863rd and 888th. If you want to use them, just remove the previous. Of course, if you want to add other extension support such as redis support, php may not provide the corresponding dll file, you need to find the corresponding version of dll and add it to the ext folder, then add an extension =... in the configuration file...
Restart Apache
When accessing phpinfo, you can see
Steps
Steps
Steps
Method/Step 4
1. 1
Iv. Summary:
The installation of the Php environment has already had a lot of information on the Internet, and I had to perform a thorough investigation when I was in contact with php, and installed it many times on my computer, at the beginning, we also used integrated software packages, such as WAMP and AppServ. After the php version upgrade, we found it very troublesome to upgrade the integration package to php. Therefore, we strongly recommend that you configure the environment by yourself, better understanding of the connection between Apache, php, and mysql.
Notes
- The installed computer must support VC11
- The number of configuration file lines may change with the version upgrade or personal modification.