PHP Binary Path under linux?

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

Moderators: Developers, Moderators

Post Reply
US
Posts: 2
Joined: Mon Apr 08, 2002 9:57 am

PHP Binary Path under linux?

Post by US »

With linux and "source code compiled php" I don't know which binary path to set. Is it possible to execute php-code without any browser (for example with lynx -source http://.../www/*.php)
I see SNMP-Graphs just under graphs, list & preview, but not under tree, network graphs. Whats the reason?
Thanks for any help. The tool looks nice.
gurb
Posts: 2
Joined: Mon Mar 04, 2002 7:00 pm
Location: zz9 plural Z Alpha
Contact:

Post by gurb »

To figure what is the path to php use 'which'
[marius@gurb marius]$ which php
/usr/bin/php
You can execute php just like any other binary 'php -h' prints out short help. The normal way to execute the binary is 'php -q' which will suppress http headers.
Guest

Post by Guest »

Sorry, but there is no php executable even in /usr/bin. Today I recompiled php (4.0.3) from source-code with the following settings:
./configure --with-mysql --with-apxs --with-snmp --with-exec-dir=/usr/bin
but no success.

On php.net (http://www.php.net/manual/ro/html/comma ... l#AEN78235) is written:
... You can only use these command line options if you have the PHP executable. If you built the server module version, and you have no CGI version available on your machine, than you have no chance to use these options.

Which is the name of the not-server-module-version and how to build it?
I hope this question is not too oftopic.
gurb wrote:To figure what is the path to php use 'which'
[marius@gurb marius]$ which php
/usr/bin/php
You can execute php just like any other binary 'php -h' prints out short help. The normal way to execute the binary is 'php -q' which will suppress http headers.
US
Posts: 2
Joined: Mon Apr 08, 2002 9:57 am

Post by US »

I found the solution under http://www.phpbuilder.com/forum/archive ... 7/4/102788

Best way I've found is to first recompile PHP as an executable (i.e. leave out the --with-apache or --with-apxs tags) and place the php executable into /usr/local/bin

It works!
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

A lot of times compiling the PHP binary with SNMP support will fail with in regards to openssl. In this case you have to compile ucd-snmp with the openssl libraries:

./configure --with-openssl=/usr/include/openssl

Then I configure PHP with:

./configure --with-mysql --with-snmp=/usr/local --enable-ucd-snmp-hack --with-openssl

That usually does the trick for me.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests