php -v answers with bash: php: command not found

SupermanInNY

Verified User
Joined
Sep 28, 2004
Messages
419
RESOLVED

/usr/local/directadmin/custombuild # php -v
-bash: php: command not found


custombuild from today,. PHP 4 or PHP 5 (I tried compling each of them and both gave me same error message).

CentOS 5.3 fresh install of DA.
i386

I tried PHP5 cli, but I got the error message of:

/usr/local/directadmin # php -v
-bash: php: command not found

I did find it in: /usr/local/bin/php

So how do I link it properly so that I can call it?

/usr/local/directadmin/custombuild # /usr/local/bin/php -v
PHP 5.2.9 (cli) (built: Apr 7 2009 03:37:52)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Thanks,

-Alon.
 
Last edited:
Resolved:

ln -s /usr/local/bin/php /bin/php

thanks proHSP in a previous post from a year ago.

Hopefully if anyone is looking for the php -v combination they will easily find them now that the Title of the post has the "php -v" in it.
 
Back
Top