acctman Posted August 24, 2007 Share Posted August 24, 2007 I want to add a LAME shell command to my php script. The coding below shows how I want it to work. Is my coding correct? I'm basing it off of how the copy() works with. //# Usage: lame -b 112 original.mp3 output.mp3 lame -b 112 ("/home/rmbsite/public_html/temp/" . session_id() . ".mp3" "/home/site/public_html/temp/112_" . session_id() . ".mp3"); Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/ Share on other sites More sharing options...
acctman Posted August 24, 2007 Author Share Posted August 24, 2007 any idea? Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333363 Share on other sites More sharing options...
effigy Posted August 24, 2007 Share Posted August 24, 2007 Shell commands must be executed through functions. Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333378 Share on other sites More sharing options...
acctman Posted August 25, 2007 Author Share Posted August 25, 2007 Shell commands must be executed through functions. i tried this but no luck, am i doing something wrong <?php exec("lame -b 112 tempo.mp3 112_tempo.mp3"); ?> Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333593 Share on other sites More sharing options...
trq Posted August 25, 2007 Share Posted August 25, 2007 You might want to use the output and error code perameters to try and do some debugging. Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333601 Share on other sites More sharing options...
Fadion Posted August 25, 2007 Share Posted August 25, 2007 as thorpe said: <?php exec("lame -b 112 tempo.mp3 112_tempo.mp3", $output); print_r($output); ?> In that way u'll see the output lines from that command. Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333604 Share on other sites More sharing options...
acctman Posted August 25, 2007 Author Share Posted August 25, 2007 the output was Array ( ) thats it nothing easy. the file did not process Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333657 Share on other sites More sharing options...
trq Posted August 25, 2007 Share Posted August 25, 2007 Use the output and return value arguments. What does this output? <?php exec("lame -b 112 tempo.mp3 112_tempo.mp3", $output, $return); echo "Return code is $return<br />"; print_r($output); ?> Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-333668 Share on other sites More sharing options...
acctman Posted August 26, 2007 Author Share Posted August 26, 2007 Use the output and return value arguments. What does this output? <?php exec("lame -b 112 tempo.mp3 112_tempo.mp3", $output, $return); echo "Return code is $return<br />"; print_r($output); ?> This is what was printed out: (no file was compiled) Return code is 127 Array ( ) Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-334224 Share on other sites More sharing options...
acctman Posted August 26, 2007 Author Share Posted August 26, 2007 problem solved, i had to input the full path to LAME Link to comment https://forums.phpfreaks.com/topic/66515-solved-adding-shell-commands-to-php/#findComment-334306 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.