GetSimple Support Forum
mp4 upload error - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: mp4 upload error (/showthread.php?tid=7211)



mp4 upload error - b3n.ji - 2015-04-17

Hi there,

I have a project where the customer wants to upload some mp4 video files and is getting a strange error message.

I've already uploaded a php.ini file to make sure the upload restrictions set by the hoster will be overwritten to make sure uploading large files will not cause any error.

Code:
memory_limit = 128M
post_max_size = 64M
upload_max_filesize = 48M


Uploading a 300kb sample mp4 file is working fine, but the customer 12mb file is getting the following error:


Code:
Uploadify

Notice: Undefined index: sessionHash in xxx on line 23
Die Datei konnte nicht hochgeladen werden - Authentifizierung gescheitert
(en: File could not be uploaded - authentication failed)



Unfortunately I'm not able to get any apache error logs as of now, I have no hoster details / login details / contact.

Maybe I'm just stupid or blind, but I have no clue where this error is coming from.

I appreciate any help Smile

Thanks in advance!
Ben


RE: mp4 upload error - shawn_a - 2015-04-17

I am guessing that the session hash never gets sent to the server because it runs out of memory before the file is done uploading. So there is still a limit problem.


RE: mp4 upload error - shawn_a - 2015-04-17

Check gs error log
data/other/logs/


RE: mp4 upload error - b3n.ji - 2015-04-18

It says

Code:
[17-Apr-2015 12:09:57] PHP Notice:  Undefined index:  sessionHash in /xxx/htdocs/admin/upload-uploadify.php on line 23



RE: mp4 upload error - shawn_a - 2015-04-18

Nothing before that?
You will need a script to check that your php.ini is actually applied, what does uploads sidebar say for maxsize?

upload-uploadify
if ($_POST['sessionHash'] === $SESSIONHASH)

It is possible that their flash is not sending it properly, but since smaller files work id say it has to do with the browser and max post size or flash, try turning off uploadify in config
GSNOUPLOADIFY


RE: mp4 upload error - b3n.ji - 2015-04-18

I'm not in my office right now as it's night here but as far as I remember there were just a few i18n special pages notices and one from one of my own scripts.

How do I check this? phpinfo seems to be ok. Sidebar says 40MB

I've already tried turning it off: upload is finished and nothing happens, no error message at all. I will check again tomorrow with debug enabled and check the error log then.
And I will test some other browsers. All of this happened/was tested with Chrome on Mac OS but as far as I remember my customer uses FF on W7 and Safari on Mac OS.

Thanks so far Shawn!


RE: mp4 upload error - shawn_a - 2015-04-18

I am going to say your best bet is to disable uploadify, since you are not reproducing the exact same environment.


RE: mp4 upload error - b3n.ji - 2015-04-18

Mhh don't get wrong, with uploadify disabled there is really nothing happening at all Smile the file is not getting uploaded and no error message.
I will try again tomorrow and keep you posted with the details Smile


RE: mp4 upload error - shawn_a - 2015-04-18

here is the new function in 3.4 to get uplaod size, maybe it will help.

PHP Code:
/**
 * get the maximum upload size as defined by php ini
 * @since  3.4
 * @return int max bytes
 */
function getMaxUploadSize(){
    
$max_upload   toBytes(ini_get('upload_max_filesize'));
    
$max_post     toBytes(ini_get('post_max_size'));
    
$memory_limit toBytes(ini_get('memory_limit'));
    
$upload_mb    min($max_upload$max_post$memory_limit);
    return 
$upload_mb;




RE: mp4 upload error - simplycrazy - 2015-04-18

does part of the file upload (for instance.. for 60 seconds) and *then* you get the error? or is it erroring-out right away?


RE: mp4 upload error - shawn_a - 2015-04-18

yeah i was wondering that as well.


RE: mp4 upload error - b3n.ji - 2015-04-18

Code:
[18-Apr-2015 09:56:04] PHP Strict Standards:  getdate() [<a href='function.getdate'>function.getdate</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /xxx/htdocs/plugins/hitcount.php on line 157
[18-Apr-2015 09:56:04] PHP Notice:  Undefined offset:  0 in /xxx/htdocs/theme/labsdesign/template.php on line 71

These are the errors from the log with GSNOUPLOADIFY. The second is just a notice, coming from the i18n navigation breadcrumb snipplet to get a sub navigation.
According to Chrome's status bar the file is getting uploaded. It takes about 20 seconds and then nothing happens. No error message or anything and as you can see there is NO error logged at all after the upload.

Shawn, your function returns:

Code:
50331648

To your questions:
In both cases upload takes about 20 seconds and is completed. With uploadify the above error comes right after the upload, without no error at all.


RE: mp4 upload error - RootIQ - 2016-08-09

My solution was to add these lines to the end of my htaccess:


php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300
php_value max_input_time 300



Note that it's not enough to just increase max filesize, you also have to increase the time. Otherwise the authentication expires while the file is still uploading.