LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2008, 11:46 AM   #1
novinjaiswal
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
not able to run php cammand. Not able to find php


Hi Friends,

I am new to linux and php. I am installing cacti. for that PHP is needed.

I was able to fine /etc/php.d folder and php.ini file. Does it mean php is installed on my Linux box.

when i run php command using ssh it no such command found.

when I find for any php files in my system i return lots of files.

I am confused.
First I want to know php is installed or not.

If installed then which version is indstalled?

thanks in advance for all your help.

Novin
 
Old 10-31-2008, 01:06 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,316

Rep: Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878
Quote:
Originally Posted by novinjaiswal View Post
Hi Friends,

I am new to linux and php. I am installing cacti. for that PHP is needed.
I was able to fine /etc/php.d folder and php.ini file. Does it mean php is installed on my Linux box.
when i run php command using ssh it no such command found.
when I find for any php files in my system i return lots of files.
I am confused.
First I want to know php is installed or not.
If installed then which version is indstalled?
thanks in advance for all your help.
Novin
Yes, it's installed. If you're typing in php and it doesn't do anything, that means that PHP isn't in your path. Find php, add that path to yours, or just type in the full path name/command. Type in "man php" to see the options, I believe "php -v" will tell you what version you're running.

Check the docs at http://www.php.net.
 
Old 10-31-2008, 01:41 PM   #3
novinjaiswal
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,

thanks for the reply I found following path.

cd /usr/local/php/bin

when i run php command i m getting following error.

bash: php: command not found

thanks
Novin
 
Old 10-31-2008, 02:19 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,316

Rep: Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878Reputation: 3878
Quote:
Originally Posted by novinjaiswal View Post
Hi,

thanks for the reply I found following path.

cd /usr/local/php/bin

when i run php command i m getting following error.

bash: php: command not found

thanks
Novin
Ok...as I said in my previous post, either put that path in your current path, or execute the full path/command. "/usr/local/php/bin/php -v"
 
Old 10-31-2008, 02:28 PM   #5
novinjaiswal
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi thanks

u r right its working thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i run my php blazer Linux - Software 3 11-18-2007 07:47 PM
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 11:25 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-18-2004 12:10 AM
Can't get PHP to run Ham1am Linux - Newbie 5 06-19-2004 06:16 PM
help getting pptp-php-gtk.php to run as root mrtwice Linux - Software 0 11-21-2003 01:49 PM


All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration