Re: How to know which PHP is used by Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Devendra Jadhav wrote:

I am still confused. As per Nilesh php's binary is not required and as per
Ashley it is required.
Which one is correct?
And I am not able to find which php's binary is used by using phpinfo().

Anyone confident about either of the two answers?

Pretty confident about all of them.  Nilesh probably misunderstood,
or we are misunderstanding him.  PHP has to have a binary file,
whether it's the CLI interpreter or the Apache "module".

Run a script with phpinfo() in it.  Look for the line that says
"Server API".  If this reads something like "Apache $N.$N Handler",
then the PHP interpreter binary is something like "libphp$n.so".
If the line reads "Command Line Interface", then you are using
something like /usr/bin/php, /usr/local/bin/php, etc. (I'm from
a BSD background, your $penguin_path may vary).

If you are talking about actually having two different versions
of PHP installed, and not sure which is actually being called,
you might find out something with the Linux equivalent of the
BSD `pkg_which`:

[31] Thu 01.Apr.2010 10:39:24
[admin@archangel][/usr/local/bin]
sudo pkg_which /usr/local/bin/php
php5-5.2.11

This command is highly dependent on your Linux distro:  on
RH I think it's "rpm", "dpkg" on Debian, "urpmf" on Mandriva,
etc.

If you have two installations of the same version, $deity
help you :-)

HTH,

Kevin Kinsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux