Entry: After some time-consuming PHP programming, the complete configuration of PHP5 + APACHE + MYSQ in Windows can be deeply lamented by the PHP configuration on WINDOWS, I used a one-click installation dumb package at the beginning, but the installation version of the dumb package is outdated.
Entry: full configuration of PHP5 apache mysq in Windows
After a period of enthusiastic PHP programming, I deeply lamented the configuration of PHP on the WINDOWS platform. at the beginning, I used a one-click installation of the dummies package, however, considering that the installation version of the dummies package is outdated, many titles are encountered when you manually configure the PHP environment. after reading a lot of materials and trying to do so, the configuration is successful. Now, I will share my configuration experience with you. trust can solve your confusion in configuring the PHP environment.
First, let's talk about the software version I used.
PHP 5.1.6
APACHE 2.0.59 (Note: To support PHP 5, add a plug-in later than APACHE 2.2.X)
MYSQL 5.0.24a
Now, start to install php5. I installed php5 first, and directly decompress the file to C: \ php (the installation won't be affected, thanks to my personal lucky number, all the paths in this article are based on my installation path. please correct them to your own path when installing them on your machine), and then install APACHE, I directly mounted it to the C root directory. during the installation process, three text boxes will be displayed. the two above will be your local IP address, and the bottom will be your EMAIL address. Installation is complete. Compile the httpd. conf file under .. \ Apache Group \ Apache2 \ conf. Open the file in Notepad and add the following two lines of code:
LoadModule php5_module 'C:/php/php5apache2. dll'
AddType application/x-httpd-php. php
I created a www directory under the C: \ directory to store my site files, in httpd. conf finds the following sentence: DocumentRoot 'C:/Apache2/htdocs' is changed to DocumentRoot 'C:/www '. In this way, the home directory is set to C: \ www. If you do not want to change the home directory status, do not change this item.
Modify the default homepage of a directory:
Find the name of the file you want to set as the homepage after DirectoryIndex, such as index.html index. php.
Language priority. find the following statements.
Export agepriority zh-CN zh-TW en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt-BR ru sv set Chinese (zh-CN zh -TW) cut the part to the front (that is, change the corresponding part of the original file to the above.
Nothing else can be corrected. The configuration of APACH is here. Next, let's talk about the PHP configuration.
Copy php. ini-dist to C: \ windows and change the name to php. ini (all php installed). then, modify the following settings:
In Data Handling, locate post_max_size = 8 M
This is the maximum size of POST data received by PHP, which can be changed to 20 MB.
Find extension_dir = Under Paths and Directories
Here we set the position of PHP search to expand the library, and set its path to the position of the extensions folder, that is,:
Extension_dir = 'C: \ php \ ext'
Find upload_max_filesize = 2 M under File Uploads, and the maximum File size promised to be uploaded
It can be changed to 20 MB.
Dynamic Extensions: this is the PHP expansion settings section. it lists all the Extensions supported by PHP. the semicolon annotations are added before. This shows that the current PHP configuration does not support expansion, we can remove the semicolon so that PHP can support this expansion. Below are some common and practical PHP extensions listed below.