PHP configuration tips include MYSQL5 garbled solutions. After some recent enthusiastic PHP programming, I was deeply touched by the configuration of PHP on the WINDOWS platform. at first, I used a one-click installation of the dummies package, however, considering the installation version of the dumb package, after some recent fanatic PHP programming, I was deeply touched by the PHP configuration on the WINDOWS platform. at first, I used a one-click installation of dumb package, however, considering that the installation version of the dummies package is lagging behind, many problems are encountered when you manually configure the PHP environment. after reading a lot of information and trying to do so, the configuration is successful. Now, I will share my configuration experience with you. I believe this will solve your confusion when configuring the PHP environment.
First, let's talk about the software version I used.
PHP 5.1.6
APACHE 2.0.59 (note: APACHE 2.2.X and later versions do not support PHP 5)
MYSQL 5.0.24a
Now, start the installation. I installed php5 first, and directly decompress the file to C: \ php (the installation won't be affected, depending on my personal lucky number, all the paths in this article are based on my installation path. please change the path to your own when installing it on your machine), and then install APACHE, I directly installed it in the C root directory. during the installation process, three text boxes will appear, the above two enter your local IP address, and the bottom enter your EMAIL, OK. Installation is complete. Edit 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" 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 location, 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.
LanguagePriority 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
Cut the part of Chinese (zh-CN zh-TW) to the front (that is, put the corresponding
Partially changed to the above.
There are no other changes. The configuration of APACH is here. Next, let's talk about the PHP configuration.
Copy php. ini-dist to C: \ windows and change it to php. ini. (you have installed php before)
Then, I modified the following parts:
In Data Handling, locate post_max_size = 8 M
This is the maximum size of POST data that PHP will accept, which can be changed to 20 MB.
Find extension_dir = Under Paths and Directories
Here, the PHP search extension Library location is set, and its path is set to the location of the extensions folder, that is, changed:
Extension_dir = "C: \ php \ ext"
Under File Uploads, find upload_max_filesize = 2 M, the maximum File size that can be uploaded
It can be changed to 20 MB.
Dynamic Extensions
Here is the PHP extension settings section, listing all the extensions supported by PHP, with a semicolon added before
Description: The current PHP configuration does not support extension. we can remove the semicolon to allow PHP to support the extension.
The following lists several common and useful PHP extensions.
Remove the semicolon in the following sentence
; Extension = php_mbstring.dll
; Extension = php_dba.dll
; Extension = php_dbase.dll
; Extension = php_filepro.dll
; Extension = php_gd2.dll
; Extension = php_imap.dll
; Extension = php_mysql.dll
The configuration of php. ini is complete. Next, it is very important
C: \ PHP \ libmysql. dll, C: \ PHP \ ext \ php_mysql.dll, C: \ PHP \ ext \ php_mysqli.dll
Copy to C: \ Windows \ system32 so that PHP5 can support MYSQL.
Restart APACHE and create a new notepad file named test in the main directory.
Phpinfo ();
?>
Save and modify the suffix to PHP. Enter in the browser
...