rubing Posted October 29, 2008 Share Posted October 29, 2008 I am trying to execute system command, but am getting a return value of 255. (i guess from bash) Here is my php script: <?php echo '<pre>'; passthru('lame --mp3input --resample 44.1 -m s --alt-preset cbr 192 -q 0 /home/bob/public_html/blahblah.com/public/ads/fosters.mp3 /home/bob/public_html/blahblah.com/public/ads/fosters2.mp3',$retval); // Printing additional info echo ' </pre> <hr />output: <hr />Return value: ' . $retval; ?> And this is the output I get: output: Return value: 255 When I input this command on my shell it works fine. Quote Link to comment Share on other sites More sharing options...
trq Posted October 29, 2008 Share Posted October 29, 2008 I would suggest you look up what lame's 255 error code means. Quote Link to comment Share on other sites More sharing options...
rubing Posted October 29, 2008 Author Share Posted October 29, 2008 From my understanding the return value is bash's. And the 255 code means that the program generated a return value that was out of range. Anyways, I just managed to fix by setting the permissions on these directories as 777 It seems that i need to do this with every directory php may write to, even though I added apache to the same group as my main user who owns these folders. I guess it's not really a problem since I am the only one who accesses the site, but this still bugs for the long term. 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.