XF 1.3 No error message when uploading too large a file

PaulineK

Member
When uploading a file in a post, if the file is too large (Maximum Attachment File Size is 10,000kb), the file upload starts but then just sits there. No error message is displayed to say your file is too large.

I changed Maximum Attachment File Size to 50,000, then uploaded a 2.1mb image, and the upload gets to 100%, but then nothing happens. I can't click Cancel either. Maximum Attachment Image Dimensions is set to 1200 x 1000.

I assume this is a problem on my server but would appreciate help on what to say to my web host.
 
The settings on my server are:
upload_max_filesize 4,194,304 (4mb)
post_max_size 8M
max_input_time -1 (unlimited)
max_execution_time 30

I set Maximum Attachment File Size in the Admin to 1000kb. When I upload an image that is 1.66MB, it uploads with no error message and displays in the post. When I upload an image that is 2.10MB, it gets to 100% in the upload and then hangs. I have to refresh the page.

> Why is the 1.66MB image not rejected for being too large?
> What PHP setting needs to be changed?
 
**** FIXED *****

I recently moved hosting companies from one VPS to Linode. After the move everything was working fine, but I started having members complaining that some images were not uploading properly.

They would upload an attachment (image) and the progress bar would hit 100% and then nothing would happen.

After a bunch of researching, I changed the following settings for PHP and MySQL to match my previous VPS. I'm unfortunately not sure which one was successful in fixing the problem, but wanted to post here (and a few other related threads) to share that this worked for me!

pico /usr/local/lib/php.ini
memory_limit = from 32M to 158M


pico /etc/my.cnf
max_allowed_packet=268435456 to max_allowed_packet=64M
wait_timeout=10 to 45

(make sure to restart your services after you make the changes)
 
Last edited:
Top Bottom