Php environment configuration, php Environment
Php installation requires three basic elements:
1. server;
2. php;
3. mysql;
4. vc environment dependency;
Set up my environment as vc11 + apache2.4 + php5.6.3 + mysql5.7 + phpstrom2016.3.2;
Installation start:
1, vc11 environment: http://www.microsoft.com/en-us/download/details.aspx? Id = 30679;
Select download and 32/64-bit. The default installation path is;
2, apache: Apache2.4.10(httpd-2.4.10-win64-VC11.zip) Web site: http://www.apachelounge.com/download/
Same path default
3. There are many mysql tutorials. I will not repeat them here. The graphic interface sqlyog is used. The method of cracking is to delete the registry after the trial. Open regedit in the file directory search and delete the registry in the red box.
4. php http://windows.php.net/download /;
5. phpstrom, which can be used on the official website.
Chinese packages can also be seen everywhere;
Installation steps;
1. apache decompression path F: \ phptools \ apache2.4;
2. php decompression path F: \ phptools \ php5.5;
3. mysql can be stored in this folder;
Configuration steps:
1. Configure php. ini
Environment variables: F: \ phptools \ php5.5 and F: \ phptools \ php5.5 \ ext Add the environment variable PATH; locate the original string and add it; then add two, separated by semicolons;
Copy F: \ phptools \ php5.5 \ php. ini-production and rename it php. ini;
Open php. ini in Notepad
This is to enable common extensions. This is critical. If an error occurs, it may cause an inexplicable problem;
; Extension_dir = "ext" Remove the semicolon and change it to extension_dir = "F:/phptools/php5.5/ext". This is critical. Previously, mysqli was unable to use it because of a problem.
; Extension = php_mbstring.dll;
; Extension = php_mysql.dll;
; Extension = php_mysqli.dll;
2. Configure apache;
F: \ phptools \ apache2.4 \ Apache24 \ conf contains httpd. conf
Open with random IDE,
# ServerName www.example.com: 80 remove #
DocumentRoot "c:/Apache24/htdocs" --> DocumentRoot "F:/phptools/Apache2.4/Apache24/htdocs"
<Directory "c:/Apache24/htdocs"> --> <Directory "F:/phptools/Apache2.4/Apache24/htdocs"
DirectoryIndex index.html --> DirectoryIndex index.html index. php index.htm
ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" --> ScriptAlias/cgi-bin/"F:/phptools/Apache2.4/Apache24/cgi-bin"
<Directory "c:/Apache24/cgi-bin"> --> <Directory "F:/phptools/Apache2.4/Apache24/cgi-bin/">
Add the following at the end of the file:
PHPIniDir "F:/phptools/php5.5/php. ini"
AddType application/x-httpd-php. php. html. htm
LoadModule php5_module "F:/phptools/php5.5/php5apache2_4.dll"
It is best not to change the order
Now, httpd. conf is configured and httpd. conf is saved.
Window + R input cmd
Open Path
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C: \ Users \ admin> F:
F: \> F: \ phptools \ Apache2.4 \ Apache24 \ bin \ httpd-k install
The previous step is to install the apache service.
Configuration complete;
Note that mysql and apache
Mysql needs to be started from the service. What I set is to start from the startup, otherwise the service needs to be started every time I open it;
Enabled; open;
Phpstorm Configuration
The local path in mapping is the place where your project is placed; The created projects are also placed in the htdocs directory;
Add the current project folder to the web path;
This configuration should have been completed. We will discuss the missing items.