Home > Article > Backend Development > mysql mysqldump PHP configuration experience contains MYSQL5 garbled solution
After a recent period of enthusiastic PHP programming, I have deep feelings about the configuration of PHP under the WINDOWS platform. At first, I used the one-click installation of the fool package. However, considering that the installation version of the fool package has fallen behind, I have to manually configure PHP. I encountered many problems when setting up the environment. After consulting a lot of information and trying, I finally configured it successfully. Now, I will share my configuration experience with you. I believe it can solve everyone's confusion about configuring the PHP environment.
First, let me talk about the software version I use.
PHP 5.1.6
APACHE 2.0.59 (Note: APACHE 2.2.X and above do not support PHP 5)
MYSQL 5.0.24a
Okay, let’s start the installation now. I installed php5 first and unzipped the file directly to C :php (It does not matter where you install it. It depends on your personal preference. All paths in this article are my installation paths. Please pay attention to modify them to your own paths when installing on your own machine.) Then install APACHE. , I installed it directly into the root directory of drive C. During the installation process, three text boxes will appear. Enter your local IP in the top two, and enter your EMAIL in the bottom one. OK. Installed. Now edit the httpd.conf file under Apache GroupApache2conf. Open the file with Notepad and add these two lines of code at the end:
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php .php
I created a www in the C: directory The directory is used to store my site files. I found this sentence in httpd.conf: DocumentRoot "C:/Apache2/htdocs" was changed to DocumentRoot "C:/www". In this way, the home directory is set to C:www. If you don't want to change the home directory location, you don't need to change this.
Modify the default homepage of the directory:
Find DirectoryIndex and write the file name you want to set as the homepage, such as: index.html index.php, etc.
Language Priority, find the following statement
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 pt-BR ru sv
Put Chinese (zh-CN zh -TW) and put it in front (that is, change the corresponding
part in the original file to the above.
There is nothing else to change. That’s it for the configuration of APACH. Next, let’s talk about the configuration of PHP.
Place php Copy .ini-dist to C:windows and rename it to php.ini (anyone who has installed PHP has done this)
Then modified a few places:
Under Data Handling, find post_max_size = 8M
This is the POST that PHP will accept The maximum size of data can be changed to 20M.
Find extensi under Paths and Directories> This is the location of the PHP search extension library, and set its path to the location of the extensions folder, that is, change it to:
extensi
In File Uploads Find upload_max_filesize = 2M, and the maximum file size allowed to be uploaded can be changed to 20M.
Dynamic Extensions
Here is the PHP extension setting section, which lists all supported extensions of PHP, with a semicolon comment in front. Indicates that the current PHP configuration does not support extensions. We can remove the semicolon to allow PHP to support the extension. Listed below are several commonly used and practical PHP extensions. Remove the semicolons in front of the following sentences.
;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
Here is php.ini The configuration is complete. Then it is very important to copy
C:PHPlibmysql.dll, C:PHPextphp_mysql.dll, C:PHPextphp_mysqli.dll
to C:Windowssystem32 so that PHP5 can support MYSQL.
Restart APACHE in the home directory. Create a new notepad file test and enter
phpinfo();
?>
After saving, change the suffix to PHP. Enter in browser
The above introduces the mysql mysqldump PHP configuration experience, including the solution to MYSQL5 garbled code, including the content of mysql mysqldump. I hope it will be helpful to friends who are interested in PHP tutorials.