PHP Not found

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

PHP Not found

Post by krazy1 »

I am trying to set up a test system with Cacti and have run into a PHP issue. I have Apache2, PHP4, MySQL, and PHPMyAdmin installed and working. I have verified that PHP works by using a php test page. The issue I have run into is when I first launch cacti it tells me it can find the PHP binary in /usr/bin. I have done a search through my whole system and I cannot find the PHP binary. Where could this be? And guess even more important how can PHP work without the binary?

If I try to run php poller.php from command line I get bash: php: command not found. I have never seen this and I am not sure how to fix it.

TIA
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

What distro are you using?

Is there a package for php-CLI?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

I am using Debian Sarge. I did a apt-get install PHP4 but when I go to /usr/bin there is no PHP binary. Only thing I can think of is I am missing a package.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Well if it's missing, then you would need to install it...
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

but that is the thing.. I have installed PHP4 and I have even run the test file and it all shows up BUT php binary is no where to be found
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Check dselect for a missing package names something like "php-cli" or "php-commandline".

I don't personally recall what it is, or even if it exists.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
apharas
Posts: 18
Joined: Mon Oct 10, 2005 12:25 pm

Post by apharas »

First try looking in /usr/local/bin this is where Debian is most likely to place the php executable.

If the file is not there, do a

dpkg -c "debian install file for php4"

Typically the deb files from an apt-get are kept in /var/cache/apt/archives .
This will list the contents of the debian file and you'll know exactly where it placed all it's files.

--
Alex
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

I found part of my answer...

When I did the install I installed everything EXCEPT cacti from Apt-get. Cacti I installed from the tar since it is a newer version then what I can get through Apt-get. Doing it this way I must have some how missed a critical package for php4.

I created a new virtual machine and did EVERYTHING through Apt-get and the php binary is right where it should be. So now I need to figure out what was missing and remember to install it next time.

I did try installing php4-cli but that didn't do the trick so I will have to do more digging to see what Cacti through Apt-get adds that I don't get with just the tar.
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

I found the packages that are needed when Cacti is not installed through Apt-get

php4-cli
php4-snmp
libphp-adodb


Once I installed those the php binary showed up in /usr/bin. Issue solved!!
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Woot, I was about to ask you where you were so I could come over and fix this... :P
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: takeatr1p and 0 guests