How to break the PHP upload file size limit

Source: Internet
Author: User
Tags php file upload
Introduce the way to break the PHP upload file size limit, including PHP file upload and phpMyAdmin related configuration method, the need for a friend reference.

phpMyAdmin Import SQL file, encountered the upload file size limit problem, the default phpMyAdmin upload file size is 2M, if you want to phpmyadmin upload more than 2M large files, You need to modify the size of the phpMyAdmin upload file configuration or the large files are divided into several batches of upload, relative to modify phpMyAdmin upload file size restrictions come a lot easier.

To resolve the phpMyAdmin upload file size limit issue, you need to modify the php.ini configuration file and phpMyAdmin profile.

Step One: Modify the file upload size configuration in the php.ini configuration file This step is consistent with the general PHP.ini Profile Upload feature method, and you need to modify the Upload_max_filesize and post_max_size two option values in the php.ini configuration file, For specific modification methods, please refer to: php.ini configuration: File upload feature configuration tutorial.

Step two: Modify PHP execution time and memory limit implementation phpMyAdmin upload large file function if you want to phpMyAdmin upload large files, you also need to modify the php.ini configuration file max_execution_time (PHP page execution maximum time), Max_ Input_time (PHP page accepts data maximum time), Memory_limit (PHP page occupies the maximum memory) three configuration options, this is because phpMyAdmin upload large files, php page execution time, memory consumption will inevitably become longer and larger, It requires the PHP running environment of the coordination, light modification upload file size limit is not enough.

Step three: Modify the phpMyAdmin configuration file after you complete the php.ini configuration, you also need to modify the phpMyAdmin configuration. 1, modify the phpmyadmin\config.inc.php configuration file $cfg[' exectimelimit ' configuration options, the default value is 300, need to be modified to 0, that is, there is no time limit. 2, modify the phpMyAdmin installation root directory in the Import page $memory_limit Note: Here memorylimit configuration from phpmyadmin\config.inc.php, the default =0

Description: Preferred to read the memory configuration option in the php.ini configuration file Memory_limit, if empty the default memory size limit is 2M, if there is no limit the memory size is limited to 10M, you can combine the information in your php.ini configuration file to modify the code.

At this point, after modifying the file upload configuration options in the PHP.ini configuration file and the phpMyAdmin profile, it is possible to resolve the phpMyAdmin upload file size limit, which allows the phpMyAdmin to upload large file functions.

  • Related Article

    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.