Home  >  Article  >  Backend Development  >  Solution to PHPMYADMIN import data with a maximum size of 2M_PHP Tutorial

Solution to PHPMYADMIN import data with a maximum size of 2M_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:19:08777browse

PHPMYADMIN is a frequently used MySql management tool. Backup and restore are important functions of PHPMYADMIN. When restoring the database, we often encounter such a situation: The maximum upload limit of PHPMYADMIN when restoring the database: 2,048 KB. If the database is slightly larger, If it cannot be processed, you must either use other backup and restore tools such as Imperial Backup King, or export it in separate volumes. So is there any way to use PHPMYADMIN to process it? It's definitely possible, just follow the steps below.

Taking the WINDOWS2003 system as an example, it is divided into three parts: IIS part, PHP part and PHPMYADMIN part.

1. IIS part

1) Solution to the problem that large-capacity files cannot be uploaded in IIS 6.0:
1. First close iis admin in the service service service.
2. Find the metabase.xml file under windows/system32/inetsrv/.
3. Open it with WordPad, find ASPMaxRequestEntityAllowed and modify it to the required value (default: 204800, that is: 200K).
4. Save, then restart the iis admin service service and restart IIS.

2) Steps to solve the problem that attachments exceeding 4M cannot be downloaded in IIS 6.0:
1. First, close the iis admin service service in the service.
2. Find the metabase.xml file under windows/system32/inetsrv/.
3. Open it with WordPad, find AspBufferingLimit and modify it to the required value (default: 4194304, that is: 4MB).
4. Save, then restart the iis admin service service and restart IIS.

2. PHP part

1. Find post_max_size, which refers to the maximum value that can be received by PHP through form POST, including all values ​​in the form. The default is 8M, see if you need to make changes.
2. Find File Uploads, first confirm file_uploads = on; whether to allow file uploading via HTTP switch, the default is ON.
3. Find upload_max_filesize; that is, the maximum size of files allowed to be uploaded. The default is 2M.
If you want to upload a file of >8M, it may not necessarily be possible to just set the above three items. It is best to also set the following parameters:
Look for max_execution_time = 600; the maximum time value (seconds) for each PHP page to run, the default is 30 seconds.
max_input_time = 600; The maximum time required for each PHP page to receive data, default 60 seconds.
memory_limit = 8M; The maximum memory consumed by each PHP page, the default is 8M.

3. PHPMYADMIN part

Open the import.php file with WordPad:
1. Find $memory_limit, the default is $memory_limit = 2 * 1024 * 1024 ; Modify it yourself.
2. There are the same statements in the three or four lines below. Modify them yourself.

By modifying the above three parts, the problem of PHPMYADMIN importing data up to 2M can be perfectly solved.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/325329.htmlTechArticlePHPMYADMIN is a frequently used MySql management tool. Backup and restore are important functions of PHPMYADMIN. When restoring the database I often encounter such a situation: PHPMYADMIN restores data...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn