Re: shebang line drive me nuts.

From: Date: Mon, 07 Aug 2006 08:13:24 +0000
Subject: Re: shebang line drive me nuts.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-240215@lists.php.net to get a copy of this message
hi Chris, Chris 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 > > 3 things to check: > > - /usr/lib/php5/bin/php exists > - /usr/lib/php5/bin/php is executable > - your script is executable. these I had checked already - I didn't make that clear, sorry. > > > If you run: > > /usr/lib/php5/bin/php -q /path/to/your/script.php > > does it work? yup that works fine. weird huh! >

« previous php.general (#240215) next »