hi Stut, I wish it was the line endings - I checked and they where unix-style. I do edit on windows normally (unless it's some rush fix and then I'll use vi or nano) but I have the line-endings set to unix. vi gave no sign of a ^M and I rewrote the shebang there just to be safe. alas no joy. Stut wrote: > Jochem Maas wrote: >> I have a php shell script (the execute bit of the file is set) >> of which the first line is this: >> >> #!/usr/lib/php5/bin/php -q >> >> or this: >> >> #!/usr/bin/php -q >> >> or this: >> >> #!php -q >> >> >> in all cases I get the following error when I run (as root) the script: >> >> -bash: ./makemicrositeml: /usr/lib/php5/bin/php: bad interpreter: >> Permission denied >> >> >> php is where I think it is: >> >> # which php >> /usr/bin/php >> # ls -lart /usr/bin/php >> lrwxrwxrwx 1 root root 21 May 9 11:40 /usr/bin/php -> >> /usr/lib/php5/bin/php >> >> any know what idiot thing I'm doing wrong? > > This can happen if the line ending in the script are DOS not UNIX - have > you been editing the file on Windows and then uploading it? Easiest way > to check is to open the file with vi and check for ^M on the end of the > lines. If it's there, remove it from the first line and try again. > > -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php