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"); Quote Link to comment Share on other sites More sharing options...
acctman Posted August 24, 2007 Author Share Posted August 24, 2007 any idea? Quote Link to comment Share on other sites More sharing options...
effigy Posted August 24, 2007 Share Posted August 24, 2007 Shell commands must be executed through functions. Quote Link to comment 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"); ?> Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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); ?> Quote Link to comment 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 ( ) Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.