php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42174 i used exec function to execute command and it did not executed
Submitted: 2007-08-02 06:39 UTC Modified: 2007-08-02 07:08 UTC
From: marwa dot yousef at mediaintl dot net Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.4.7 OS: Apache
Private report: No CVE-ID: None
 [2007-08-02 06:39 UTC] marwa dot yousef at mediaintl dot net
Description:
------------
i want to convert a video file of any extension to a flv extension (flash extension) and save it in a specific folder. i used the execute function built in php (exec[command]) to run a command to do that but it didn't work. i don't know why. so please help me to fix this error.

Reproduce code:
---------------
if($config[vresize] == 1) {$encodecommand="$config[mencoder] $config[vdodir]/$vdoname -o $config[flvdodir]/".$vid."x.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$config[vbitrate]:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vop scale=$config[vresize_x]:$config[vresize_y] -srate $config[sbitrate]";
  }else {
    $encodecommand="$config[mencoder] $config[vdodir]/$vdoname -o $config[flvdodir]/".$vid."x.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=$config[vbitrate]:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -srate $config[sbitrate]";
  }
if(exec("$encodecommand")) {
  //update flv metatags
  exec("flvtool2 -Uv $config[flvdodir]/".$vid."x.flv $config[flvdodir]/".$vid.".flv");
  exec("$config[metainject] -Uv $config[flvdodir]/".$vid."x.flv $config[flvdodir]/".$vid.".flv");

Expected result:
----------------
convert any video file from its extension to .flv extension and move it to a flvdir folder.

Actual result:
--------------
didn't executed at all.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-02 07:08 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC