Re: shebang line drive me nuts.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Robert,

thanks for thinking with me ....

Robert Cummings wrote:
> On Mon, 2006-08-07 at 09:59 +0200, 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?
> 
> Check the permissions on /usr/lib/php5 and on /usr/lib/php5/bin and
> on /usr/lib/php5/bin/php
> 
> Any one of those being set incorrectly can deny you access.

the php binary is executable for everyone:

 # ls -lart /usr/lib/php5/bin/php
-rwxr-xr-x 1 root root 7012544 Jul  5 18:26 /usr/lib/php5/bin/php

and running the script as follows doesn't give any errors:

# /usr/lib/php5/bin/php -q ./makemicrositeml -h

(it shows the help message - I haven't got round to exactly testing the
script proper ;-)

any ideas>

> 
> Cheers,
> Rob.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux