Announcement

#1 2013-09-30 12:11:25

mariposa
Member
2013-09-30
12

Image upload not over ~1MB from within Piwigo

Hi all,

I can only upload photos from within Piwigo, which are smaller than around 1MB

(The largest image successfully uploaded had 992kB, the smallest unsuccessful test was 1025kB).

The error message I get is: "413 Request Entity Too Large"

This is true for the following settings:
Piwigo 2.5.2
Webserver: nginx 1.2.1

My /etc/php5/fpm/php.ini contains the following settings:
memory_limit = -1;
upload_max_filesize = 40M;
post_max_size = 40M;
as described in http://www.mainframes.co.uk/index.php/2 … out-error/

I have verified that I have changed the correct php.ini file by running phpinfo().

I have used the advice in:
http://piwigo.org/forum/viewtopic.php?id=22334
and
http://piwigo.org/forum/viewtopic.php?p … 57#p123457

but have not really gotten anywhere beyond this strange limitation to uploading images smaller than 1MB.

When running phpinfo() I noticed that "apc.max_file_size" was set to 1M. However increasing this value to 40M (for consistency) has had no effect.

I would be very grateful if someone could point me in the right direction to proceed.

Thanks for all suggestions.

Offline

 

#2 2013-09-30 13:54:06

mariposa
Member
2013-09-30
12

Re: Image upload not over ~1MB from within Piwigo

Hi all,

I found the error. It was related to nginx.

Nginx has a max. body size limit of 1 MB for requests as default. This can be increased by setting "client_max_body_size" to a larger number. It can be set in the http, server and location sections of the nginx configuration file

A good description, including an example-nginx.conf can be found here:
http://www.faqforge.com/linux/nginx-ser … too-large/

I placed it in my "https"-section of the configuration file for my website in /etc/nginx/sites-available/, restarted nginx and since then, upload also works for much larger files.

Thank you all who looked at my question and I hope I could provide an answer for others.

Offline

 

#3 2013-09-30 14:00:28

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Image upload not over ~1MB from within Piwigo

Very useful feedback. Thank you mariposa!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact