We are experiencing troubles with the file assignment submission plugin.
When uploading snapshots from mobile to our servers, files are not always uploaded (tests with Samsung galaxy s4 and chrome).
After taking a snapshot, the upload progress bar displays "Uploading", then "File saved successfully".
When pressing the "Save changes" button, the Submissions status page appears but the submitted picture is sometimes blank (like missing files). I mean, the submitted file is blank half the time although the upload progress bar displays "File saved successfully".
There is no error in Apache logs even when the snapshot is blank.
With the Chrome Developer Tools I get these logs even when the snapshot is properly uploaded:
Refused to set unsafe header "Content-length" module.js:1
Refused to set unsafe header "Connection" module.js:1
What could be responsible for this chaotic upload behavior ?
Snapshots always works properly when testing with my computer (with the flash plugin).
Do you actually mean the PoodLL assignment submission? Or the File Assignment submission? Lets assume you mean PoodLL, because you mention the flash plugin.
The "refusing to set unsafe header" message, is a red herring. Its just a warning, that I should make go away, but it does not affect your upload.
I have never seen this behaviour and its odd that it is so inconsistent. One possibility could be the file size of the uploaded pictures. Though I would expect an error if it was truncated. Can you try it on http://demo.poodll.com and report if it works there?
It might be that you have suhosin enabled on your web server which can interfere with uploads that it thinks are too large. (But this would usually be one of the last things to investigate. So lets try and find something more obvious first.)
Sorry about the confusion, this problem concerns the PoodLL assignment submission.
I did some test on http://demo.poodll.com and everything worked properly.
(I have not found any snapshot test on the demo site so I created one)
The following error also occured on the the submission page of our Moodle:
"yui_combo.php?3.9.1/build/simpleyui/simpleyui-min.js&3.9.1/build/loader/loader-min.js:31 GET https://[...]/filter/poodll/progress.png 404 (Not Found)"
[...] = our domain
I did not mentioned it because I did not think it was related to the main problem.
Does PoodLL implements some restrictive artistic rules or something ?
Like "Oh sorry dude, you look awful on this picture, I just can't upload this !"
What should I check now ?
Thank you very much for your help Justin
Ha ha ..artistic rules. I will have to add those ... "only beautiful people please."
The fact that it can't find the progress image is interesting. But it would not be a showstopper. However I see you are using https. That can cause problems with html5 audio/video playback if the mobile device does not like the certificate. If that was the problem it would probably fail consistently.
I wonder if it could be as simple as poor network connectivity exacerbated by having to do it all over https? That it does not deliver an error is a bit unusual. If you can experiment with using https for login only that would be worth doing, to see if it made a difference.
When an image does fail, can it be right clicked and downloaded? If so it would be interesting to look at the file. Sometimes when there is in an error, it gets written out into the image file, totally messing it up. That could be the case here. If you open the file in a text editor, you would see the error message in there at the top.
Well, let's start with the good news. Problem solved !
You were right, the problem was due to the maximum file size limitation.
My mistake was to check the Apache logs (/var/log/apache2/) instead of the global logs (/var/log) where the suhosin logs are actually stored on our server!
The file size was one of the first things I thought would be responsible for this problem. So I used the lowest resolution allowed on my gs4 thinking it would solve any possible file size problem. I did not anticipate that this lowest resolution would still be too large...
The chaotic behavior was due to the variation of the size of the pictures which were sometimes larger than the suhosin max_value_lenght.
I added the following values in /etc/php5/conf.d/suhosin.ini :
suhosin.memory_limit = 128
suhosin.post.max_value_length = 10000000
suhosin.request.max_value_length = 10000000
Is there a way to detect warnings of suhosin and to prevent the "File saved successfully" message when files are too large ?
Thank you very much for your help Justin