• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Unable to upload files ...

Kainzo

Active member
#1
We moved web hosts / new VPs
When trying to upload any file size, this is the error message.
The following error occurred
slider.png - The uploaded file is too large for the server to process.

That file is 33kb. PHP upload limit is set at 8M. MySQL is 64M for the max..

We have moved from Apache2 to Nginx on the new VPS


xenForo upload limit is still set at 5Mb (did a straight copy/paste from the previous VPS.


Any thoughts?
 

Tracy Perry

Well-known member
#2
That file is 33kb. PHP upload limit is set at 8M. MySQL is 64M for the max..
We have moved from Apache2 to Nginx on the new VPS
xenForo upload limit is still set at 5Mb (did a straight copy/paste from the previous VPS.
Any thoughts?
Did you restart nginx and php5-fpm after making any upload size changes?
 

Kainzo

Active member
#3
Did you restart nginx and php5-fpm after making any upload size changes?
I'm using php5-cgi ... but no everything had more than enough on the file sizes so there was no need to restart. the file is only 33kb I dont know how anything would be set smaller than that...
 

Tracy Perry

Well-known member
#4
I'm using php5-cgi ... but no everything had more than enough on the file sizes so there was no need to restart. the file is only 33kb I dont know how anything would be set smaller than that...
/data(and all subdirectories) and /internal_data(and all subdirectories) have the correct chmod setting?
Also, if you are using nginx, I would STRONGLY recommend using php5-fpm as it is much nicer to play with.
Also, did you check your nginx error log and php log?
 

Kainzo

Active member
#5
/data(and all subdirectories) and /internal_data(and all subdirectories) have the correct chmod setting?
Also, if you are using nginx, I would STRONGLY recommend using php5-fpm as it is much nicer to play with.
Also, did you check your nginx error log and php log?
I ensured that the data/internall data was set to CHMOD 777 .. still giving this message..

The uploaded file is too large for the server to process.

slider.png


Also - I am using CGI, not sure what will break if I yank it and add in Php5-fpm .. a little new to nginx.
 

Tracy Perry

Well-known member
#6
I ensured that the data/internall data was set to CHMOD 777 .. still giving this message..

The uploaded file is too large for the server to process.

slider.png


Also - I am using CGI, not sure what will break if I yank it and add in Php5-fpm .. a little new to nginx.
I'm using php5-fpm with nginx on a debian 7.0 server. Only thing you have to double check is in /php5/fpm/pool.d/www.conf you change (or make sure it is correct) the listen directive to
listen = 127.0.0.1:9000

and then in your nginx definition for the server running the forum have something similar to
Code:
    # use fastcgi for all php files
        location ~ \.php$ {
        # Zero-day exploit defense.
        # http://forum.nginx.org/read.php?2,88845,page=3
        try_files $uri /index.php =404;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_intercept_errors on;
        fastcgi_ignore_client_abort off;
        fastcgi_connect_timeout 60;
        fastcgi_send_timeout 180;
        fastcgi_read_timeout 180;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
 

Kainzo

Active member
#7
I'm using php5-fpm with nginx on a debian 7.0 server. Only thing you have to double check is in /php5/fpm/pool.d/www.conf you change (or make sure it is correct) the listen directive to
listen = 127.0.0.1:9000

and then in your nginx definition for the server running the forum have something similar to
Code:
    # use fastcgi for all php files
        location ~ \.php$ {
        # Zero-day exploit defense.
        # http://forum.nginx.org/read.php?2,88845,page=3
        try_files $uri /index.php =404;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_intercept_errors on;
        fastcgi_ignore_client_abort off;
        fastcgi_connect_timeout 60;
        fastcgi_send_timeout 180;
        fastcgi_read_timeout 180;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
thanks for the replies, I'm still struggling with it... not 100% sure whats im doing wrong heh... when setting the temp/buffer size in the config it states;
Restarting nginx:
nginx: [emerg] "fastcgi_busy_buffers_size" must be less than the size of all "fastcgi_buffers" minus one buffer in /etc/nginx/nginx.conf:74
nginx: configuration file /etc/nginx/nginx.conf test failed
root@site:~#
 

Tracy Perry

Well-known member
#8
thanks for the replies, I'm still struggling with it... not 100% sure whats im doing wrong heh... when setting the temp/buffer size in the config it states;
Restarting nginx:
nginx: [emerg] "fastcgi_busy_buffers_size" must be less than the size of all "fastcgi_buffers" minus one buffer in /etc/nginx/nginx.conf:74
nginx: configuration file /etc/nginx/nginx.conf test failed
root@site:~#
You need to also modify your nginx.conf file

Here is the one I have set in mine (and works with the example I gave earlier)
Also, it's telling you specifically on line 74 of your nginx.conf that the setting is incorrect. You need to correct that size to correspond.

Code:
client_max_body_size 75m;

client_body_buffer_size 26K;
client_header_buffer_size 1k;
client_body_in_file_only clean;
#client_max_body_size 2m;
large_client_header_buffers 2 1k;
##Http Fast CGI modules
fastcgi_buffer_size 16m;
fastcgi_buffers 16 16m;
 

Kainzo

Active member
#9
You need to also modify your nginx.conf file

Here is the one I have set in mine (and works with the example I gave earlier)
Also, it's telling you specifically on line 74 of your nginx.conf that the setting is incorrect. You need to correct that size to correspond.

Code:
client_max_body_size 75m;

client_body_buffer_size 26K;
client_header_buffer_size 1k;
client_body_in_file_only clean;
#client_max_body_size 2m;
large_client_header_buffers 2 1k;
##Http Fast CGI modules
fastcgi_buffer_size 16m;
fastcgi_buffers 16 16m;
ah... I see - I didnt think that any of these settings were even listed on my nginx.conf - I'll have to add it now