Nginx does not import phpmyadmin database: "413 Request Entity Too Large"

Asked

Viewed 847 times

3

i have a database of 1.31MB I’m trying to import into my phpmyadmin, which on the side indicates that it supports importing Full Size Database: 2.048KB.

But, I’m not getting... every time I try to care gives that message:

"413 Request Entity Too Large"

  • take a look here: http://answall.com/questions/41619/enviando-arquivos-no-nginx-erro-413-request-entity-too-large/41623#41623

2 answers

2

You must set the directive client_max_body_size for a higher value, different from the 1MB standard. The intention is to prevent customers from uploading too large since in most common cases it is just a form or a photo. Something larger than 1MB would be suspicious, but not in your case. Add this to your configuration file:

client_max_body_size 5m;

I recommend not for a very high value here. Use the minimum that serve for you.

  • You also need to change the PHP limit if you will not continue giving the error.

0

It is necessary to make changes to the file php.ini

upload_max_filesize = <Tamanho Desejado>M  

Then change the server settings in Nginx. In the file /etc/nginx/conf.d/default.conf or your server file in the folder /etc/nginx/sites-available/

server {
    client_max_body_size <Tamanho Desejado>M;
    ...
}

And finally, restart the service.

# service nginx restart

Here it’s working properly.


Withdrawn response of this post.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.