Home >Backend Development >PHP Tutorial >Why is my phpMyAdmin import file size limit still 2MB even after modifying upload_max_filesize and post_max_size?

Why is my phpMyAdmin import file size limit still 2MB even after modifying upload_max_filesize and post_max_size?

DDD
DDDOriginal
2024-11-02 12:55:02199browse

Why is my phpMyAdmin import file size limit still 2MB even after modifying upload_max_filesize and post_max_size?

Trouble Increasing phpMyAdmin Import File Size Limit?

Despite modifying parameters such as upload_max_filesize and post_max_size, the import file size limit remains at 2MB. This issue may arise when using Zend Server CE on a Ubuntu VirtualBox over a Windows 7 host.

Solution:

To resolve this issue, locate the php.ini file on your server and follow these steps:

  • Step 1: Edit php.ini

Using a text editor such as gedit, open php.ini for editing:

sudo gedit /etc/php5/apache2/php.ini
  • Step 2: Adjust post_max_size

Locate the post_max_size entry and set a value larger than the size of your database (e.g., 25M).

  • Step 3: Set memory_limit

Find the memory_limit entry and give it a value greater than post_max_size.

  • Step 4: Check upload_max_filesize

Ensure that the value of upload_max_filesize is smaller than post_max_size.

The order from largest to smallest should be:

memory_limit > post_max_size > upload_max_filesize
  • Step 5: Restart Apache

Save the php.ini file and restart Apache:

sudo /etc/init.d/apache2 restart

Remember to restart Apache services after making changes to apply them.

The above is the detailed content of Why is my phpMyAdmin import file size limit still 2MB even after modifying upload_max_filesize and post_max_size?. For more information, please follow other related articles on the PHP Chinese website!

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