Estou tendo dificuldades em importar tabelas do excel com 2M acima.

Olá, estou tendo dificuldades para importar tabelas do excel acima de 2M. Configuração do servidor: Apache2 + mysql. Abaixo de 2M estou conseguindo. O que deve está acontecendo?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
October 4, 2023

Heya, @lourivaldasilvajunior

Check your MySQL configuration for any size limits that might affect imports. For example, the max_allowed_packet setting in MySQL can affect the maximum size of data packets that can be sent to the server. You may need to increase this value if it’s too low for your import.

I assume you’re using PHP as well, so you can increse the following limits in the PHP configuration as well:

upload_max_filesize and post_max_size directives in your php.ini file to allow larger uploads. For example:

  1. upload_max_filesize = 10M
  2. post_max_size = 10M

After making changes, remember to restart your Apache server for the changes to take effect.

Hope that this helps!

Site Moderator
Site Moderator badge
October 4, 2023


The problem you’re describing is a common one when dealing with web servers and PHP configurations. When you’re trying to upload large files, such as Excel tables over 2MB, there are a few configurations that can restrict this:

  1. PHP upload_max_filesize Directive: This is the maximum size of an uploaded file. If the Excel file is larger than this setting, you’ll be unable to upload it.

  2. PHP post_max_size Directive: This sets the maximum size for POST data. The uploaded file is sent to the server using the POST method, so this setting also affects file uploads. Make sure this value is larger than upload_max_filesize.

  3. PHP memory_limit Directive: This is the maximum amount of memory that a PHP script can consume. If the process of handling the uploaded file exceeds this memory limit, it will fail.

  4. Apache Timeout & Other Configurations: If the upload process takes too long, Apache might time out.

  5. Client-Side Limitations: Sometimes, the client or browser might have restrictions or issues with larger uploads.

How to Resolve:

  1. Edit your php.ini file. You can find its location by creating a phpinfo() file or using the command php --ini.

  2. Modify or add the following lines:

upload_max_filesize = 10M
post_max_size = 12M
memory_limit = 128M

You can adjust the values based on your needs. For instance, if you need to upload files up to 10MB, set upload_max_filesize to 10M and adjust the other values accordingly.

  1. Save the php.ini file.

  2. Restart your Apache server to apply the changes:

sudo systemctl restart apache2
  1. Test the upload again.

If you’ve made these changes and still face issues, consider checking Apache configurations, any .htaccess file for restrictions, and also ensure there’s enough space on your server to handle the uploads. Additionally, look into server logs for any error messages that can provide more insights into the issue.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel