• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Getting multiple files when uploading only one

Started by anokana,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

anokanaTopic starter

Hello, Mario!
I get videos uploaded and converted properly by ffmpeg, but when I am uploading only one file, I have  more then 5000 duplicate files in the list in Video Manager of Admin Panel (and the same in ..._Videos table of the database)!
What is the problem?
Thanks
  •  

Marius P.

Hi! I assume is an shell_exec issue with triggering videocron.php, try this:

Quote from: Alexander on
You could try this solution I've shared on 23 February.


lib/upload-ffmpeg.php
//Needs converting
$db->query("INSERT INTO ".DB_PREFIX."videos (`date`,`pub`,`token`, `user_id`, `tmp_source`, `thumb`) VALUES (now(), '0','".$token."', '".user_id()."', '".$file."','uploads/processing.png')");
$binpath = get_option('binpath','/usr/bin/php5');
$command = $binpath." -f ".ABSPATH."/videocron.php";
exec( "$command > /dev/null &", $arrOutput );


changed to

//Needs converting
$db->query("INSERT INTO ".DB_PREFIX."videos (`date`,`pub`,`token`, `user_id`, `tmp_source`, `thumb`) VALUES (now(), '0','".$token."', '".user_id()."', '".$file."','uploads/processing.png')");


and videocron.php added as a cpanel cron (else, no conversion).
http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/CronJobs
http://www.siteground.com/tutorials/cpanel/cron_jobs.htm

This has happen before, but it's 2-3 people out of thousands, can't say it's an error to fix.
Mostly an shel_exec conflict on server.


Let me know the outcome.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

anokanaTopic starter

Hey, Mario,
I solved the problem by replacing the line

$command = $binpath." -f ".ABSPATH."/videocron.php";

with
$command = $binpath."-cli -f ".ABSPATH."/videocron.php";


This runs the script only one time
  •  

Marius P.

Thanks for reporting, I will check how safe is that -cli.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)