Home > Database > Mysql Tutorial > Why Doesn\'t Increasing `upload_max_filesize` and `post_max_size` in php.ini Solve My PhpMyAdmin Import File Size Limit?

Why Doesn\'t Increasing `upload_max_filesize` and `post_max_size` in php.ini Solve My PhpMyAdmin Import File Size Limit?

Linda Hamilton
Release: 2024-11-30 22:51:11
Original
477 people have browsed it

Why Doesn't Increasing `upload_max_filesize` and `post_max_size` in php.ini Solve My PhpMyAdmin Import File Size Limit?

PhpMyAdmin Import File Size Limitation

Question:

Despite modifying upload_max_filesize and post_max_size in php.ini, the file size limit remains at 2MB. Why is this occurring?

Answer:

Step 1: Locate the php.ini File

Locate the php.ini file on your server. For Ubuntu VirtualBox with Apache2 and PHP5:

sudo gedit /etc/php5/apache2/php.ini
Copy after login

Step 2: Modify File Size Limit Parameters

Within the php.ini file, make the following changes:

  • post_max_size: Set it to a value larger than the desired database size (e.g., post_max_size = 25M).
  • memory_limit: Assign it a value larger than post_max_size (e.g., memory_limit = 30M).
  • upload_max_filesize: Ensure it is smaller than post_max_size (e.g., upload_max_filesize = 20M).

Step 3: Ensure Order from Largest to Smallest

The parameters should be configured in descending order:

    memory_limit
    post_max_size
    upload_max_filesize
Copy after login

Step 4: Save and Restart Apache

Save the changes to php.ini and restart Apache:

sudo /etc/init.d/apache2 restart
Copy after login

Additional Note:

Remember to restart Apache services to apply the changes.

The above is the detailed content of Why Doesn\'t Increasing `upload_max_filesize` and `post_max_size` in php.ini Solve My PhpMyAdmin Import File Size Limit?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template