Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mp4 upload error
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.

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:


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!
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Check gs error log
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
It says

[17-Apr-2015 12:09:57] PHP Notice:  Undefined index:  sessionHash in /xxx/htdocs/admin/upload-uploadify.php on line 23
Nothing before that?
You will need a script to check that your php.ini is actually applied, what does uploads sidebar say for maxsize?

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
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
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!
I am going to say your best bet is to disable uploadify, since you are not reproducing the exact same environment.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
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
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);

NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
does part of the file upload (for instance.. for 60 seconds) and *then* you get the error? or is it erroring-out right away?
yeah i was wondering that as well.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
[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:


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.
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.

Users browsing this thread: 1 Guest(s)