Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Some users, sometimes, not able to upload images. [REALLY SOLVED this time.]
whu606
MVP
Vanilla 2.1.11
I'm hosting my site on a Digital Ocean droplet, with nginx.
I just moved the site there recently.
In testing, people could upload no problem.
When I went live, some users reported not being able to upload.
I checked chwon permissions, and could upload images.
Initially I thought it was i-Stuff specific, but some users with Android have reported it.
It doesn't affect every user, and a user who could upload from i-Pad earlier today now can't, but still can from their i-Phone.
I haven't the remotest idea what could be causing this, and there doesn't seem any obvious way to reproduce it.
Anyone had this, or got any suggestions?
Tagged:
0
Comments
Perhaps it has been due to connection timeouts, and/or size of images.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
It could very well be due to the file size of the images.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@peregrine
Thanks
Good point.
I think I must have uploaded a clean version of the plugin, and in my original had allowed files of 2mb, so we hadn't faced the issue before.
Thanks.
And thanks @hgtonight
OK, went a bit early with the SOLVED!
It is definitely a file size limitation, but I can't seem to change it.
I have changed the class.imageupload to
$Sender->AddDefinition('ImageUpload_MaxFileSize', C('Plugins.UploadImage.MaxFileSize', '2.0mb'));
my conf.php to add
$Configuration['Garden']['Upload']['MaxFileSize'] = '3M';
my php.ini in fpm folder to
but the limit stays stubbornly at <0.5mb
I'm not using any caching bar memcached.
Any further suggestions?
Disabled and re-enabled, no difference.
You also need to set the php setting "post_max_size" to allow the content be posted.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@hgtonight
Thanks for the reply, but it is already at:
post_max_size = 8M
I just can't see why the changes aren't taking.
Are you getting a nginx error on these uploads?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@hgtonight
I might be...
Where would I look?
Where ever your error_log is set in your config.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Well, nginx error shows
even thought I've changed the class.imageload file to
$Sender->AddDefinition('ImageUpload_MaxFileSize', C('Plugins.UploadImage.MaxFileSize', '5mb'));
https://www.google.com/search?q=location+of+nginx+error+logs&ie=utf-8&oe=utf-8
you also might check php error logs as well.
$Configuration['Garden']['Errors']['LogEnabled'] = TRUE;
$Configuration['Garden']['Errors']['LogFile'] = 'log/DebugLog';
http://vanillaforums.org/discussion/26786/tutorial-how-to-enable-a-debug-log-and-collect-debugging-information
you can use ini_get and ini_set to read and change things.
to see what php shows you can use phpinfo.
and you can also create showsize.php and run it from your browser.
also add to your config.
$Configuration['Plugins']['UploadImage']['MaxFileSize'] = '3mb'
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks @peregrine
Result shows
post_max_size = 8M upload_max_filesize = 2M
conf is
I assume there must be another setting over-riding all these, but I have no idea what or where.
so the maximum size of upload with your settings is 2M.
is that what you want?
maybe you are not adding it to the correct php.ini file.
use phpinfo to determine what php.ini is being read.
double-check your php.ini as well for duplicate entries or non-commented entries.
with apache you can also set
php_value upload_max_filesize 8000000
or perhaps maybe there is something in nginx that cuts it back to 2M
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
nginx defaults to 1mb for the
client_max_body_size
. Consider upping that as well.http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Turns out I had to add
to nginx.conf
Thank you both for steering me in the right direction.