Author Topic: [HOW TO] Comman Line Interface Alternative (CLI) - video conversion  (Read 6608 times)

inmotion

  • Administrator
  • Hero Member
  • *****
  • Posts: 2788
  • PHPmotion Developer
    • PHPmotion Demo
This is a solution if you do not have CLI support for PHP.

IMPORTANT: For this solution to work you must have Curl installed on your server (most Plesk, Cpanel etc server have this already)

1) Open the file /uploader_finished.php and locate the following line (near bottom)
Quote
//else load convertor in background
exec("$path_to_php $convertor $uploaded_file_name> /dev/null &");// (>/dev/null & part is what sends to background)


//========================================================= START OF TBS DISPLAY =================================================================

$blk_id = 0;//html table - error block
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_upload_complete.htm";//middle of page
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;// no more error message displayed.
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->Show();
@exec("$path_to_php $convertor $uploaded_file_name> /dev/null &");// (>/dev/null & part is what sends to background)
@mysql_close();
die();


2) Change it to the following
Quote
//else load convertor in background
@exec("curl -G http://yourdomain.com/convertor.php > /dev/null &");// (>/dev/null & part is what sends to background)


//========================================================= START OF TBS DISPLAY =================================================================

$blk_id = 0;//html table - error block
$template = "templates/main_1.htm";
$inner_template1 = "templates/inner_upload_complete.htm";//middle of page
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;// no more error message displayed.
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->Show();
@exec("curl -G http://yourdomain.com/convertor.php > /dev/null &");// (>/dev/null & part is what sends to background)
@mysql_close();
die();


yourdomain.com if your real domain name (without the www.)
« Last Edit: September 23, 2007, 08:12:51 AM by inmotion »