XF 1.4 Uploading Issue

Goat585

Member
I have a new forum that I just created. My users and I are having an issue uploading files to threads. Small files less than 1mb are uploading fine anything larger is not working. The file uploads to 100% but nothing happens after that. A thumbnail does not show up and I can not cancel or do anything else. I have read a bunch of threads and have tried a bunch of things and I still cannot get it to work properly. I have changed my php settings, the attachment options in xenforo and change the config file and still it is not working. I contacted my internet host and they could not figure it out.

Can someone please provide some suggestions on what else I should look for?

Thanks
 
There might be a related error in the log:

Admin CP -> Tools -> Server Error Log

It could also be something to do with your image library in the case of image attachments:

Admin CP -> Home -> Options -> Attachments -> Default Image Processor

Or here are some server settings which might be limiting:

PHP (can be viewed at admin.php?tools/phpinfo):
max_execution_time
memory_limit
post_max_size
upload_max_filesize

MySQL:
max_allowed_packet
max_packet_size
wait_timeout
 
Thanks for your response.

I was not getting an error before but now I got this:

Error Info
ErrorException: Fatal Error: Out of memory (allocated 39321600) (tried to allocate 3888 bytes) - library/XenForo/Image/Gd.php:78
Generated By: Chi-Town Aquariums, Yesterday at 9:20 PM
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(124) "http://www.chitownaquariums.com/ind...2f363ddf597047d4c8beadf9cc4&content_type=post"
["_GET"] => array(3) {
["attachments/do-upload_json"] => string(0) ""
["hash"] => string(32) "4ed402f363ddf597047d4c8beadf9cc4"
["content_type"] => string(4) "post"
}
["_POST"] => array(7) {
["Filename"] => string(19) "2011 04 12_5425.JPG"
["_xfNoRedirect"] => string(1) "1"
["content_data"] => array(1) {
["thread_id"] => string(1) "7"
}
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
["_xfSessionId"] => string(32) "953e1649e128be79c8723774d4965ed5"
["Upload"] => string(12) "Submit Query"
}

I am not sure what this means but I would appreciate some feedback on it.

Thanks
 
That particular error means that PHP could not allocate more memory. Resizing larger images requires more memory.

This error isn't memory_limit related. It either indicates the server is out of memory or there is some sort of limit (such as a ulimit) that is limiting the per process memory usage. It's much more likely to be the latter value as the amount of memory allocated appears to be exactly 37.5 MB. Only your host would be able to resolve this limit.

If they can't resolve it for you, you can disable thumbnailing/resizing of images over certain dimensions, but you'd have to bring this down significantly so it may trigger quite commonly for your users.
 
That particular error means that PHP could not allocate more memory. Resizing larger images requires more memory.

This error isn't memory_limit related. It either indicates the server is out of memory or there is some sort of limit (such as a ulimit) that is limiting the per process memory usage. It's much more likely to be the latter value as the amount of memory allocated appears to be exactly 37.5 MB. Only your host would be able to resolve this limit.

If they can't resolve it for you, you can disable thumbnailing/resizing of images over certain dimensions, but you'd have to bring this down significantly so it may trigger quite commonly for your users.

Thanks for your message. I talked with my provider 1and1 and they adjusted all the setting up to 256mb and I am still having the issue. Is there possibly a setting I am missing in Xenforo that can be causing the issue?

Thanks
 
There might be a related error in the log:

Admin CP -> Tools -> Server Error Log

It could also be something to do with your image library in the case of image attachments:

Admin CP -> Home -> Options -> Attachments -> Default Image Processor

Or here are some server settings which might be limiting:

PHP (can be viewed at admin.php?tools/phpinfo):
max_execution_time
memory_limit
post_max_size
upload_max_filesize

MySQL:
max_allowed_packet
max_packet_size
wait_timeout


How do I get to this MySQL settings? Is it through the PHP.ini?

Sorry for all the questions I am new to this and still learning what everything is.
 
Looks to be the same error


Error Info

ErrorException: Fatal Error: Out of memory (allocated 39321600) (tried to allocate 13056 bytes) - library/XenForo/Image/Gd.php:78
Generated By: Chi-Town Aquariums, Today at 9:36 PM
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(124) "http://www.chitownaquariums.com/ind...3ac2dd70c650cb1df3097622a21&content_type=post"
["_GET"] => array(3) {
["attachments/do-upload_json"] => string(0) ""
["hash"] => string(32) "582423ac2dd70c650cb1df3097622a21"
["content_type"] => string(4) "post"
}
["_POST"] => array(7) {
["Filename"] => string(12) "IMG_0498.JPG"
["_xfNoRedirect"] => string(1) "1"
["content_data"] => array(1) {
["thread_id"] => string(1) "7"
}
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
["_xfSessionId"] => string(32) "9a9c61d3341aaf59f7c1c6e88ba78317"
["Upload"] => string(12) "Submit Query"
}
}
 
Your host didn't fix the error.

You said they increased an unspecified limit to 256mb. Which setting was that? Note Mike's post... this is not a PHP memory_limit issue.
 
Thanks. I was on the phone with them for a couple hours and they said everything they can set right is done and should work. Either they don't know what they are doing or I don't know how to communicate the issue to them. Im thinking about just changing hosts. Waiting on him for 30 minutes everything I need to talk with them is driving me crazy.

Do you guys have a recommendation on a good host for my forum? My forum is just starting up at this time so I dont need something too large.
 
Just point them to Mike's post:

This error isn't memory_limit related. It either indicates the server is out of memory or there is some sort of limit (such as a ulimit) that is limiting the per process memory usage. It's much more likely to be the latter value as the amount of memory allocated appears to be exactly 37.5 MB. Only your host would be able to resolve this limit.

I use http://asmallorange.com/
 
**** 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:
Back
Top Bottom