Comments on: Multiple PHP Instances With One Apache https://mossiso.com/2009/09/02/multiple-php-instances-with-one-apache/ mossiso = more better Fri, 01 Feb 2013 18:55:55 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: ammon https://mossiso.com/2009/09/02/multiple-php-instances-with-one-apache/#comment-9760 Sat, 06 Oct 2012 15:36:43 +0000 http://historicalwebber.mossiso.com/?p=311#comment-9760 In reply to Justin.

Great comment, Justin. I’m glad the tutorial was helpful. I think at the time I wanted to see how cgi and module would perform. I’m not sure if you can run PHP as two separate modules in Apache. I know multiple PHP as cgi is possible. I seem to remember Apache could only handle one PHP as module, but I bet it could be done with different PHP config and module files.

If anyone does figure that out, please post back your findings.

]]>
By: Justin https://mossiso.com/2009/09/02/multiple-php-instances-with-one-apache/#comment-9759 Sat, 06 Oct 2012 15:23:08 +0000 http://historicalwebber.mossiso.com/?p=311#comment-9759 This post comes up within the first five results for a number of Google searches I did while trying to figure out how to configure multiple instances / versions of PHP on a single Apache server. The article is extremely well written and was very helpful, but by the time I finished with the configuration you suggest, I was puzzled by one thing.

Why is it necessary to have the second instance run as CGI?

Since you’re declaring a separate Action and Handler (php524-cgi in your case), would it not be possible to have both versions of php compiled with apxs, and running as Apache modules?

Your handler, declared within the VirtualHost configuration, would direct Apache to use php524 for that particular Virtual Host, while another VirtualHost configuration would use the ‘default’ php module – which I assume in the example you give would be PHP 5.2.0 but could just as easily be PHP 5.3.x or PHP 5.4.x

This would mean that it would be possible to run both instances as Apache modules and avoid the disadvantages associated with running PHP as CGI. Similarly, you could run both PHP versions as CGI and avoid the disadvantages of running as an Apache module – depending on your environment and what you’re trying to achieve.

Any thoughts on this?

I have yet to try this as my dev server now is operational with the configuration as suggested above, but I’d like to know if anyone has tried running two versions of PHP both as Apache modules.

]]>
By: ammon https://mossiso.com/2009/09/02/multiple-php-instances-with-one-apache/#comment-9092 Wed, 01 Aug 2012 17:47:36 +0000 http://historicalwebber.mossiso.com/?p=311#comment-9092 In reply to Matt.

Hi Matt,

Glad this helped.

Boy this was a long time ago. We don’t have this set up anymore, so I can’t go back and verify, but here’s my best guess as to what is up.

The opening and closing tags should be in there. I added them as I think they should go.

The ScriptAlias line should be the one pointing to /path/to/php524-cgi/.

Thanks for catching those issues. I updated the post with those changes.

]]>
By: Matt https://mossiso.com/2009/09/02/multiple-php-instances-with-one-apache/#comment-9090 Wed, 01 Aug 2012 17:20:16 +0000 http://historicalwebber.mossiso.com/?p=311#comment-9090 I’m confused by the last part, your XXXXX_vhosts.conf file. First, you don’t include the opening and closing tags, shouldn’t these be in there somewhere? Also, the directories you instructed to create were:

$ mkdir /path/to/php524/
and
$ mkdir /path/to/php524-cgi/

However I don’t see /path/to/php524-cgi/ used in your configuration directives? Could you clarify?

Great article, thanks.
Matt

]]>