[ciapug] php interpreter errors

Ryan O'Rourke ciapug@cialug.org
12 Apr 2004 14:51:31 -0500


On Mon, 2004-04-12 at 14:47, David Champion wrote:
> Ryan O'Rourke wrote:
> 
> >When trying to run the following php script from the command line, why
> >does it work when I do:
> >	php test.php
> >but not when I do:
> >	./test.php
> >??
> >
> >#!/usr/local/bin/php
> ><?php
> >$test =  "testing - testing";
> >echo $test;
> >?>
> >
> >
> >The error I get is ": bad interpreter: No such file or directory"

> >
> 
> At the command prompt, type "which php"... it will show you if it's in 
> your path. Also look at ls -l /usr/local/bin/php - could be that it 
> doesn't exist.

Again, I should have mentioned these things in the initial post as well.

# which php
/usr/local/bin/php
# ls /usr/local/bin/php
/usr/local/bin/php