LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 10: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, 12:06 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,719

Rep: Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973
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, 12: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, 01:19 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,719

Rep: Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973Reputation: 7973
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, 01: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



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 06:47 PM
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
Can't get PHP to run Ham1am Linux - Newbie 5 06-19-2004 05:16 PM
help getting pptp-php-gtk.php to run as root mrtwice Linux - Software 0 11-21-2003 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 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
Open Source Consulting | Domain Registration