pgrevents Posted June 16, 2009 Share Posted June 16, 2009 Ok what I am trying to do is send an argument to a perl file to execute im making headway but there is an error here is my code <? php shell_exec('/usr/bin/php get_iplayer --info > testfile.txt'); ?> The error is getting printed to a text file thats what the > testfile.txt is the error is X-Powered-By: PHP/5.2.8 Content-type: text/html <br /> <b>Parse error</b>: syntax error, unexpected T_STRING in <b>/home/steve/public_html/get_iplayer/get_iplayer</b> on line <b>1610</b><br /> No only when I put the /usr/bin/php in the shell_exec do I get any printout whatsoever. I know this script works as I use putty to print that command is there anything on the php side to eliminate this. I think the reason it does error is cause of the usr/bin/php but thats the only line that will make the script react to anything outside shell Link to comment https://forums.phpfreaks.com/topic/162471-passing-arguments/ Share on other sites More sharing options...
DavidAM Posted June 16, 2009 Share Posted June 16, 2009 Ok what I am trying to do is send an argument to a perl file to execute im making headway but You say you are trying to execute a perl file, but you are running /usr/bin/php. I'm not sure, but I really don't think PHP will understand PERL. Is that a typo in your question or just running the wrong interpreter? Link to comment https://forums.phpfreaks.com/topic/162471-passing-arguments/#findComment-857584 Share on other sites More sharing options...
pgrevents Posted June 17, 2009 Author Share Posted June 17, 2009 well i dont get a response from the perl script without the php i have tried the perl in place Link to comment https://forums.phpfreaks.com/topic/162471-passing-arguments/#findComment-857627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.