Posted by David Haynes on 06/03/06 11:33
vito wrote:
> "Michael Vilain" <vilain@spamcop.net> wrote in message
> news:vilain-74AD59.02180503062006@comcast.dca.giganews.com...
>> In article <e5rj5q$27d3$1@justice.itsc.cuhk.edu.hk>,
>> "vito" <vitogen2003@yahoo.com.tw> wrote:
>>
>>> how to config the linux to know the path of /usr/bin/php so no need to
>>> type
>>> it before running a php script every time?
>> it should be in your path already. try discussing your account with
>> your local sysadmin. they should be able to set your account up to do
>> this without a problem.
>>
>
> well, even though it is added by
>
> set path = ($path /usr/bin/php)
>
> it can't recognize the interpreter and run it directly. the first ? in
> <?php> immediately generates an error.
>
> thanks for your help anyway :)
>
>
This is if you are running the cshell. (echo $SHELL will tell you)
For sh, ksh, bash use: export PATH=$PATH:<path to php directory>
For example:
If your php was installed as /usr/local/bin/php, you would set:
export PATH=$PATH:/usr/local/bin
This will last for the life of the login session. If you want it
permanently you will have to add this command to your shell run-time
commands file (e.g. .bashrc)
-david-
[Back to original message]
|