[Solved] Video upload progress stuck at 100%

edited April 2016 in Bugs and Errors
Hey there!

This is really baffling me so I thought I'd come here and request some help.

I initially installed the script on an Amazon EC2 instance and it worked OK apart from larger videos didn't upload even though the php.ini file was set to allow it. I thought, to hell with that, and decided to go self hosted as I had a server running anyway so here's my problem:

Now nothing uploads. I choose the video file, press upload, it gets to 100% and then does nothing.

I have edited the HTML files so that only an admin can get to the upload page from the admin section but I have set everything to "large enough numbers" in the php.ini (/etc/php5/apache2/php.ini)
Do I need to also put the same settings in the "cli" php.ini file maybe? (/etc/php5/cli/php.ini) Although I don't think I did that last time because the site detected the location of PHP as "/usr/bin/php" and had no errors there just a "Settings have been updated." which is the same as it's doing now.

I have tested with the "front page" upload option and the error it gives is:
"Errors were encountered during the processing of your file, and it cannot be uploaded at this time. We apologize for this inconvenience. Our support team has been notified and will investigate into the cause and fix for this issue. If you continue to experience problems using this feature please contact us for further assistance. "

I am running Ubuntu Server with Apache 2.

Here is a link to my php info: https://oldflix.cf/info.php
(Please ignore the warning about the unsafe certificate, I'm in the process or sorting that out.)

I have also installed ffmpeg and the site throws no errors about about the location or anything about that. (/usr/local/bin/ffmpeg)

Permissions are set to 777 on the uploads directory and the folders inside it as well as the logs folder although it doesn't get far enough to actually create any logs.

Maybe it's the encoding options that are stopping it from advancing? I did mess with random ones whilst browsing the forums for helpful posts thinking it could be that.

H264:
-vcodec libx264 -s 600x340 -vb 800k -acodec libfaac -ab 96k -ar 44100 -f mp4

Mobile:
-vcodec libx264 -acodec libmp3lame -f mp4

Thumbnail:
-s 640x480 -t 1 -r 1 -f mjpeg

Hope you can help, thanks and keep up the good work!

Comments

  • edited August 2015
    It's not a problem with FFMPEG or encoding, as it's not getting that far in the process yet. Your problem lies in the actual "file upload" phase.

    After reviewing your PHP info file, I noticed one thing. Try to set the value for "upload_tmp_dir" to "/tmp" or the equivalent on your system. Make sure Apache/PHP has write access and plenty of space if this is a custom location.

    The rest of your ini looks good.

    Does your Apache error log show anything? Try adding this to the end of the file /cc-core/system/bootstrap.php:

    ini_set('display_errors', 1);
    error_reporting(E_ALL);


    Also check the JS error console in your browser so see if there are any errors.
  • Fixed it!

    The problem was because of the following:

    Upon checking for JS errors in the browser console I got:
    "Nginx: 413 Request Entity Too Large"

    I thought, but hold on... I'm running Apache but the main server is running nginx and acts as a reverse proxy to the Ubuntu server running Apache, although Apache was all setup correctly nginx wasn't allowing uploads over 2MB in it's config file and got in the way.

    For anyone else who may have this issue sometime, I solved it by adding:
    client_max_body_size 700M;
    in the server config on the nginx side.

    Thanks Damian for pointing me in the right direction with the JS console!
    (that I didn't even know existed!)
This discussion has been closed.