Re: How to know which PHP is used by Apache

From: Date: Thu, 01 Apr 2010 15:46:48 +0000
Subject: Re: How to know which PHP is used by Apache
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-303728@lists.php.net to get a copy of this message
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

« previous php.general (#303728) next »