Command Line PHP (its an easy one, I'm just to newbie)

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
khutton
Cacti User
Posts: 77
Joined: Tue Jun 18, 2002 9:01 am
Location: Alexandria, Virginia
Contact:

Command Line PHP (its an easy one, I'm just to newbie)

Post by khutton »

Ok, I can get the website up and running fine. I was able to run the install and set up crontab to run every 5 minutes. I know this because I am getting mail telling me that there is a problem with my crontab entry. I just can't get any command line PHP to run. My php binary is not in /usr/local/bin and I am not sure where it is or if it was even created when I ran ./config.

I am not a Linux guru but I know enough to have to rebuild the box when I start playing with things :roll: . I am unsure what to do, should I look for the binary? how should I find the binary? should I recompile it and put it there?

I am running RedHat 7.3. I am running cacti on another box, an XP box, so Iunderstand the basics but running under Linux is giving me fits. :cry: Any help is greatly appreciated.
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

Post by bocasman »

Hi,

To find the php bin file try running this command:
[root@linuxbox cacti]# find / -name 'php*'
With this you should find any string with the word php, and by this you should be able to find the binary if you actualy have it.

Any way if you dont have it you would have to re-compile the php, I did it so:
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-track-vars --with-mysql=/usr/local/mysql --enable-ftp --enable-cli

make
make install
Remember to set again all the stufs that you have enabled on the first time you compiled the php.

After this you will have to move the binary to where ever place you think it should be.

I hope this help you.
Regards,
BM
khutton
Cacti User
Posts: 77
Joined: Tue Jun 18, 2002 9:01 am
Location: Alexandria, Virginia
Contact:

hmmmm

Post by khutton »

OK maybe I am dumber than I think. What would be the name of the php binary? php???????
khutton
Cacti User
Posts: 77
Joined: Tue Jun 18, 2002 9:01 am
Location: Alexandria, Virginia
Contact:

Post by khutton »

I recompiled with the cli option. The webserver is working fine still but i still cant find the php Binary. Where is the default location of the file?
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

Post by bocasman »

OK, don't be so rud with your self.

OK, run this command:
find / \! -type d -name 'php*'
This will print all the files that contained the string php, but not print the files that are directories, after it promt you with the results, seek for the ones that don't have any extension. Focus on those files, then get in to the directory of those files and type a:
ls -l
this will give you more information an you will see if its is a binary or not:

The properties shall be something like this:
-rwxr-xr-x
Regards,
BM
khutton
Cacti User
Posts: 77
Joined: Tue Jun 18, 2002 9:01 am
Location: Alexandria, Virginia
Contact:

Post by khutton »

I found it. Thank you very much for your help.
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

Post by bocasman »

OK, remove the wild card option:
find / \! -type d -name 'php'
This will give the exact file.
Regards,
BM
bocasman
Posts: 24
Joined: Mon Aug 19, 2002 8:27 am
Location: Panama
Contact:

Post by bocasman »

You are very welcome.
Regards,
BM
khutton
Cacti User
Posts: 77
Joined: Tue Jun 18, 2002 9:01 am
Location: Alexandria, Virginia
Contact:

Post by khutton »

It's ALIVE!!!!!!!!!!!!!!

Thanks for the help. It is greatly appreciated.

Kevin
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests