From: Teus Benschop on
On Thu, 2010-04-01 at 19:07 +0530, Devendra Jadhav wrote:
> With my case both installation of PHP has version 5.x, so how to know which
> PHP is being used?
>
Running this page through Apache could do it:

<?php
phpinfo ();
?>

Teus.

From: Devendra Jadhav on
On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschop <teusjannette(a)gmail.com>wrote:

> On Thu, 2010-04-01 at 19:07 +0530, Devendra Jadhav wrote:
> > With my case both installation of PHP has version 5.x, so how to know
> which
> > PHP is being used?
> >
> Running this page through Apache could do it:
>
> <?php
> phpinfo ();
> ?>
>
> Teus.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
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().



--
Devendra Jadhav
देवेंद्र जाधव
From: Devendra Jadhav on
On Thu, Apr 1, 2010 at 7:22 PM, Devendra Jadhav <devendra.in(a)gmail.com>wrote:

> On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschop <teusjannette(a)gmail.com>wrote:
>
>> On Thu, 2010-04-01 at 19:07 +0530, Devendra Jadhav wrote:
>> > With my case both installation of PHP has version 5.x, so how to know
>> which
>> > PHP is being used?
>> >
>> Running this page through Apache could do it:
>>
>> <?php
>> phpinfo ();
>> ?>
>>
>> Teus.
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 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().
>
>
>
>
> --
> Devendra Jadhav
> देवेंद्र जाधव
>

Anyone confident about either of the two answers?


--
Devendra Jadhav
देवेंद्र जाधव
From: Nilesh Govindarajan on
On 04/01/10 20:30, Devendra Jadhav wrote:
> On Thu, Apr 1, 2010 at 7:22 PM, Devendra Jadhav<devendra.in(a)gmail.com>wrote:
>
>> On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschop<teusjannette(a)gmail.com>wrote:
>>
>>> On Thu, 2010-04-01 at 19:07 +0530, Devendra Jadhav wrote:
>>>> With my case both installation of PHP has version 5.x, so how to know
>>> which
>>>> PHP is being used?
>>>>
>>> Running this page through Apache could do it:
>>>
>>> <?php
>>> phpinfo ();
>>> ?>
>>>
>>> Teus.
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>> 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().
>>
>>
>>
>>
>> --
>> Devendra Jadhav
>> देवेंद्र जाधव
>>
>
> Anyone confident about either of the two answers?
>
>

Well, you can do a trial test. Compile a different version of php
without libphp5.so, and replace the php interpreter of libphp5.so with
this one.

If phpinfo() from apache shows you a different version then libphp5 uses
the binary else not.

As per common logic, libphp5 embeds the php interpreter into apache,
hence it'd not make sense to say that it needs the binary.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !
From: Kevin Kinsey on
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(a)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