Unlimited attachment transfer cancel PHP Upload restrictions _ PHP Tutorial

Source: Internet
Author: User
Tags form post metabase
Unlimited attachment transfer cancels PHP Upload restrictions. How to cancel PHP Upload restrictions correctly? 1. modify the PHP. ini file. Find the PHP. ini file in PHP and open it on the WordPad: 1. search for post_max_size, which indicates how to correctly cancel a form POST to P.

Cancel PHP Upload restriction 1. modify the PHP. ini file.

Find the PHP. ini file in PHP and open it on the WordPad:

1. search for post_max_size, which refers to the maximum value that can be received by the form POST to PHP, including all values in the form. the default value is 8 MB. you need to change it.
2. search for File Uploads. First, check file_uploads = on; whether to allow File upload over HTTP. the default value is ON. Upload_tmp_dir;
Find upload_max_filesize; that is, the maximum file size that can be uploaded. The default value is 2 MB.
3. if you want to upload a file larger than 8 MB, you can set only the above four items. It is best to set the following parameters:
Query max_execution_time = 600; maximum time (in seconds) for running each PHP page. the default value is 30 seconds.
Max_input_time = 600; maximum time required for receiving data on each PHP page. the default value is 60 seconds.
Memory_limit = 8 M; maximum memory consumed by each PHP page. the default value is 8 M.

Cancel PHP Upload Limit 2. modify the PHPmyadminimport. PHP file. (Note: This setting is for PHPmyadmin. if your database is very large, you can back up the database in this way, instead of backing up the database by volume)

Open the import. php file on the WordPad:
1. search for $ memory_limit. the default value is $ memory_limit = 2*1024*1024. modify it by yourself.
2. modify the statements at the same position in the following three lines.

Cancel the PHP Upload limit. 3. this is not the case yet. this is a problem with IIS.

1) solution to failure to upload large-capacity files in IIS 6.0:

1. disable the iis admin service in the service.
2. find the metabase. xml file under windowssystem32inetsrv.
3. open it on the WordPad and find ASPMaxRequestEntityAllowed to change it to the desired value (default value: 204800, that is, 200 K ).
4. Save the disk, restart the iis admin service, and restart IIS.

2) solve the following steps:

1. disable the iis admin service in the service.
2. find the metabase. xml file under windowssystem32inetsrv.
3. open it on the WordPad and find AspBufferingLimit to change it to the desired value (default value: 4194304, that is, 4 MB ).
4. Save the disk, restart the iis admin service, and restart IIS.

OK. in the above three steps, the limit of 2 m for PHP is fully handled!

Solution to canceling PHP Upload restrictions:

Check the following lines in PHP. ini:
Upload_max_filesize = 8 M
Post_max_size = 10 M
Memory_limit = 20 M

In addition, to confirm the Upload

Similar to the following line

  
 
  1. < input
  2. type="hidden"
  3. name="MAX_FILE_SIZE"
  4. value="500000">

The above describes how to cancel the PHP Upload restrictions.


Cancel PHP Upload restrictions 1. modify the PHP. ini file. Find the PHP. ini file in PHP and open it on the WordPad: 1. search for post_max_size, which indicates to POST the file to P...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.