Re: [PHP] How to know which PHP is used by Apache

2010-04-02 Thread Devendra Jadhav
On Thu, Apr 1, 2010 at 11:30 PM, Nilesh Govindarajan li...@itech7.comwrote:

 On 04/01/10 23:03, Kevin Kinsey wrote:

 Nilesh Govindarajan wrote:

 libphp5.so doesn't need the php binary.


 You're right, and of course not. libphp5.so
 *is* a PHP binary :-)

  I've confirmed this using a test.

 My local apache is configured to use libphp5.so

 I moved /usr/bin/php to /root, then started apache and ran drupal. It
 worked.

 This confirms that libphp5.so is independent of the php binary in
 /usr/bin as I suggested earlier.


 No one was questioning that .. or at least, I wasn't.
 One is an executable binary file ... a program.

 The other is also a binary file, but it's a _library_.

 What I said was you need one or the other. A binary
 file, either the Apache SO or the binary interpreter...

 It's possible to configure Apache to use a PHP executable
 (CGI), and the CGI and CLI executables are similar, if
 not identical.

 I dunno if anyone actually does that anymore, though. :-)

 Ashley said The libphp5.so is the Apache module that
 links PHP into Apache. You need this and PHP installed
 if you want to use PHP in Apache. Devendra apparently
 misinterpreted this to mean that you need both the SO and
 the binary interpreter, but you don't. You DO need the
 rest of the PHP extensions, libraries, config files, etc.
 ... a PHP installation, whether or not your have the
 CLI binary is not that important, although I always do
 since I like to run system scripts in PHP via cron, etc.

 Kevin Kinsey


 LOL. Super misunderstanding. Anyway, I did that test to help Devendra.


 --
 Nilesh Govindarajan
 Site  Server Administrator
 www.itech7.com
 मेरा भारत महान !
 मम भारत: महत्तम भवतु !

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


I think I am clear with everything now.. Good.. Thank you very much Nilesh,
kevin, Ashley  all.


-- 
Devendra Jadhav
देवेंद्र जाधव


[PHP] How to know which PHP is used by Apache

2010-04-01 Thread Devendra Jadhav
Hi All,

In the situation if there are two PHP's installed on the Linux box.
How to know which PHP is used by Apache?

Another question is do Apache need PHP's binary to execute PHP Scripts? If
yes what is the role of libphp5.so in Apache?

Note: PHP is configured as module under Apache.

Appreciate your thoughts.

-- 
Devendra Jadhav
देवेंद्र जाधव


Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Ashley Sheridan
On Thu, 2010-04-01 at 19:00 +0530, Devendra Jadhav wrote:

 Hi All,
 
 In the situation if there are two PHP's installed on the Linux box.
 How to know which PHP is used by Apache?
 
 Another question is do Apache need PHP's binary to execute PHP Scripts? If
 yes what is the role of libphp5.so in Apache?
 
 Note: PHP is configured as module under Apache.
 
 Appreciate your thoughts.
 


The libphp5.so is the Apache module that links PHP into Apache. You need
this and PHP installed if you want to use PHP in Apache.

The module itself indicates what version of PHP Apache will be using.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Devendra Jadhav
On Thu, Apr 1, 2010 at 6:59 PM, Ashley Sheridan 
a...@ashleysheridan.co.ukwrote:

  On Thu, 2010-04-01 at 19:00 +0530, Devendra Jadhav wrote:

 Hi All,

 In the situation if there are two PHP's installed on the Linux box.
 How to know which PHP is used by Apache?

 Another question is do Apache need PHP's binary to execute PHP Scripts? If
 yes what is the role of libphp5.so in Apache?

 Note: PHP is configured as module under Apache.

 Appreciate your thoughts.



 The libphp5.so is the Apache module that links PHP into Apache. You need
 this and PHP installed if you want to use PHP in Apache.

 The module itself indicates what version of PHP Apache will be using.

   Thanks,
 Ash
 http://www.ashleysheridan.co.uk



With my case both installation of PHP has version 5.x, so how to know which
PHP is being used?

-- 
Devendra Jadhav
देवेंद्र जाधव


Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Richard
Hi,

 In the situation if there are two PHP's installed on the Linux box.
 How to know which PHP is used by Apache?

 Another question is do Apache need PHP's binary to execute PHP Scripts? If
 yes what is the role of libphp5.so in Apache?

 Note: PHP is configured as module under Apache.

This may help:

?php
phpinfo();
?

-- 
Richard Heyes
HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 20th March)
Lots of PHP and Javascript code - http://www.phpguru.org

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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Nilesh Govindarajan

On 04/01/10 19:00, Devendra Jadhav wrote:

Hi All,

In the situation if there are two PHP's installed on the Linux box.
How to know which PHP is used by Apache?

Another question is do Apache need PHP's binary to execute PHP Scripts? If
yes what is the role of libphp5.so in Apache?

Note: PHP is configured as module under Apache.

Appreciate your thoughts.



First of all, libphp5.so is created during the php compilation process. 
So it will use version of php with which it was compiled.


Also, I don't think php's binary is needed for execution of php scripts 
is needed.


--
Nilesh Govindarajan
Site  Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Teus Benschop
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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Devendra Jadhav
On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschop teusjanne...@gmail.comwrote:

 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
देवेंद्र जाधव


Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Devendra Jadhav
On Thu, Apr 1, 2010 at 7:22 PM, Devendra Jadhav devendra...@gmail.comwrote:

 On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschop teusjanne...@gmail.comwrote:

 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
देवेंद्र जाधव


Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Nilesh Govindarajan

On 04/01/10 20:30, Devendra Jadhav wrote:

On Thu, Apr 1, 2010 at 7:22 PM, Devendra Jadhavdevendra...@gmail.comwrote:


On Thu, Apr 1, 2010 at 7:13 PM, Teus Benschopteusjanne...@gmail.comwrote:


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
मेरा भारत महान !
मम भारत: महत्तम भवतु !

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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Kevin Kinsey

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
[ad...@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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Nilesh Govindarajan

libphp5.so doesn't need the php binary.

I've confirmed this using a test.

My local apache is configured to use libphp5.so

I moved /usr/bin/php to /root, then started apache and ran drupal. It 
worked.


This confirms that libphp5.so is independent of the php binary in 
/usr/bin as I suggested earlier.


--
Nilesh Govindarajan
Site  Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Kevin Kinsey

Nilesh Govindarajan wrote:

libphp5.so doesn't need the php binary.


You're right, and of course not.  libphp5.so
*is* a PHP binary  :-)


I've confirmed this using a test.

My local apache is configured to use libphp5.so

I moved /usr/bin/php to /root, then started apache and ran drupal. It 
worked.


This confirms that libphp5.so is independent of the php binary in 
/usr/bin as I suggested earlier.


No one was questioning that .. or at least, I wasn't.
One is an executable binary file ... a program.

The other is also a binary file, but it's a _library_.

What I said was you need one or the other.  A binary
file, either the Apache SO or the binary interpreter...

It's possible to configure Apache to use a PHP executable
(CGI), and the CGI and CLI executables are similar, if
not identical.

I dunno if anyone actually does that anymore, though.  :-)

Ashley said The libphp5.so is the Apache module that
links PHP into Apache. You need this and PHP installed
if you want to use PHP in Apache.  Devendra apparently
misinterpreted this to mean that you need both the SO and
the binary interpreter, but you don't.  You DO need the
rest of the PHP extensions, libraries, config files, etc.
 ... a PHP installation, whether or not your have the
CLI binary is not that important, although I always do
since I like to run system scripts in PHP via cron, etc.

Kevin Kinsey

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



Re: [PHP] How to know which PHP is used by Apache

2010-04-01 Thread Nilesh Govindarajan

On 04/01/10 23:03, Kevin Kinsey wrote:

Nilesh Govindarajan wrote:

libphp5.so doesn't need the php binary.


You're right, and of course not. libphp5.so
*is* a PHP binary :-)


I've confirmed this using a test.

My local apache is configured to use libphp5.so

I moved /usr/bin/php to /root, then started apache and ran drupal. It
worked.

This confirms that libphp5.so is independent of the php binary in
/usr/bin as I suggested earlier.


No one was questioning that .. or at least, I wasn't.
One is an executable binary file ... a program.

The other is also a binary file, but it's a _library_.

What I said was you need one or the other. A binary
file, either the Apache SO or the binary interpreter...

It's possible to configure Apache to use a PHP executable
(CGI), and the CGI and CLI executables are similar, if
not identical.

I dunno if anyone actually does that anymore, though. :-)

Ashley said The libphp5.so is the Apache module that
links PHP into Apache. You need this and PHP installed
if you want to use PHP in Apache. Devendra apparently
misinterpreted this to mean that you need both the SO and
the binary interpreter, but you don't. You DO need the
rest of the PHP extensions, libraries, config files, etc.
... a PHP installation, whether or not your have the
CLI binary is not that important, although I always do
since I like to run system scripts in PHP via cron, etc.

Kevin Kinsey


LOL. Super misunderstanding. Anyway, I did that test to help Devendra.

--
Nilesh Govindarajan
Site  Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

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