Re: [PHP] bad interpreter error from CLI

2009-03-13 Thread Daniel Brown
On Fri, Mar 13, 2009 at 10:10, Thodoris t...@kinetix.gr wrote: Hi gang,   I am trying to run a script from cli which goes like this: #!/usr/bin/php ?php passthru(printenv); ? The error I get is this: /usr/bin/php^M: bad interpreter: Permission denied Note the ^M --- then use

Re: [PHP] bad interpreter error from CLI

2009-03-13 Thread Thodoris
Note the ^M --- then use dos2unix from the command line on the Linux box to fix the line endings on that file. The ^M character is a sure-fire sign of a Windows-saved file. Already tried that but I still get the same error (without the ^M of course) so I think it's not the line

Re: [PHP] bad interpreter error from CLI

2009-03-13 Thread Daniel Brown
On Fri, Mar 13, 2009 at 10:23, Thodoris t...@kinetix.gr wrote: [snip!] Both commands return the same path. and that path, I'll presume, is the same you have set in the script, right? Please offer as much information as you can with each email to speed up the troubleshooting process.

Re: [PHP] bad interpreter error from CLI

2009-03-13 Thread Thijs Lensselink
Thodoris wrote: Hi gang, I am trying to run a script from cli which goes like this: #!/usr/bin/php ?php passthru(printenv); ? The error I get is this: /usr/bin/php^M: bad interpreter: Permission denied the php binary is indeed in this location and when I run the same script like

Re: [PHP] bad interpreter error from CLI

2009-03-13 Thread Thodoris
On Fri, Mar 13, 2009 at 10:23, Thodoris t...@kinetix.gr wrote: [snip!] Both commands return the same path. and that path, I'll presume, is the same you have set in the script, right? Please offer as much information as you can with each email to speed up the troubleshooting

Re: [PHP] bad interpreter error from CLI

2009-03-13 Thread Thodoris
Thodoris wrote: Hi gang, I am trying to run a script from cli which goes like this: #!/usr/bin/php ?php passthru(printenv); ? The error I get is this: /usr/bin/php^M: bad interpreter: Permission denied the php binary is indeed in this location and when I run the same script like this: