0

hi all
im trying to find out where the hack php5 is installed on my computer..
its not on /usr/bin/php5
im trying to run a php script with the ./ command.
i searched php5 on my computer and enter this code at the begining:

#!/etc/php5/apache2

etc...
allways get the same thing:
"bad interperter: Permssion denied"
anyhelp?

3
Contributors
14
Replies
15
Views
8 Years
Discussion Span
Last Post by codejoust
0

This will find the php interpreter for you and use it, don't directly link to it.

#!/usr/bin/env php

Edited by ShawnCplus: n/a

0

hi
thanks for your help!
is it

#!/usr/bin/env php

or

#!/usr/bin/env

because the first one doesnt work...

0

hi
thanks for your help!
is it

#!/usr/bin/env php

or

#!/usr/bin/env

because the first one doesnt work...

It's #!/usr/bin/env php and if that doesn't work then you didn't install php correctly. If you're using ubuntu or any debian distro it is just sudo apt-get install php5 .

0

i am using ubuntu
and i've installed it like u said...
and still
nothing...
any idea?

0

i am using ubuntu
and i've installed it like u said...
and still
nothing...
any idea?

type ls /usr/local/bin and if php isn't in that list then reinstall it.

0

i have nothing on /usr/local/bin
i did sudo apt-get autoremove php5
then sudo apt-get install php5
still nothing...

0

i have nothing on /usr/local/bin
i did sudo apt-get autoremove php5
then sudo apt-get install php5
still nothing...

type php -v on the command line and paste the output here.

0

this is when i typed php5 -v
"the program php5 is currently not installed. you can install it by typinh: apt-get install php5-cli"
the same appeaed when i type php -v.
BTW: im using sun virtual machine.
does it have any affect on it??

0

ok
i've installed php5-cli
now what?

Now do the same thing, type php -v and paste the output here. If it says something like

PHP 5.2.6 (cli) (built: sometime)
Copyright (c) 1997-2009 The PHP Group
Zend Engine blah blah

Then you have it installed correctly and try what I said in my first post to get your script working on the command line

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.