RE: [PHP-INSTALL] php4 and php5 on the same apache instance
| From: | Mark Galbreath | Date: | Thu, 30 Jun 2005 13:08:48 +0000 |
| Subject: | RE: [PHP-INSTALL] php4 and php5 on the same apache instance | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-16410@lists.php.net to get a copy of this message | ||
Adam Trachtenberg's "Upgrading to PHP 5" (O'Reilly 2004) describes how to do
this (more or less) in 'Appendix C: Installing PHP 5 alongside PHP 4.' Basically, you
want to install and configure one version of PHP as an Apache module (--with-apxs) and the other in
its default CGI configuration. Then, create 2 virtual servers in httpd.conf and have one PHP
version listening on one port (*:80?) and the other on another (*:8080?) with its own doc root.
Then, when a request is made on one of the ports, the respective PHP interpreter will handle it.
~mark
-----Original Message-----
From: Bogdan TARU [mailto:bgd@icomag.de]
Sent: Thursday, June 30, 2005 8:57 AM
To: php-install@lists.php.net
Subject: [PHP-INSTALL] php4 and php5 on the same apache instance
Hello list,
I have been tried for a couple of days now to get php4 and php5 to run on
the same apache instance, w/o much success (apache 1.3.33, php 4.3.11, php
5.0.4 on a freebsd 4.9 box). I have based my tries mainly on this article:
http://www.digitalsandwich.com/archives/14-PHP5-and-PHP4-Running-on-SAME-apache-server.html
but I always got segmentation fault when trying to access a .php page from
the webserver (with both LoadModule php4_module and LoadModule php5_module
directives active in my apache config file).
I'm pretty sure that php4 and php5 can coexist happily on the same
apache instance, given enough symbol names are changed in order to avoid
conflicts. So, could anyone please give me a list of the symbols which need
to be modified so that I can load both modules simultaneously? Up until now
I modified in my PHP5's source code only the sapi/apache/mod_php5.c file,
and set the following symbol names:
application/x-httpd-php -> application/x-httpd-php5
application/x-httpd-php-source -> application/x-httpd-php5-source
php_value -> php5_value
php_flag -> php5_flag
php_admin_value -> php5_admin_value
php_admin_flag -> php5_admin_flag
As about all the other possibilities (running two apache instances on two
different ports/ips or running one php version as cgi) -- they are really
not an option for me.
Thanks,
bgd
*******************************************************************************************************************
This email and any file transmitted with it may be confidential and is intended solely for the use
of the individual or entity to whom it is addressed.. If you received this email in error please
notify the DBM Service Desk by forwarding this message to servdesk@dbm.state.md.us.
This email has been scanned by networkMaryland Antivirus Service for the presence of computer
viruses.
*******************************************************************************************************************
This email and any file transmitted with it may be confidential and is intended solely for the use
of the individual or entity to whom it is addressed.. If you received this email in error please
notify the DBM Service Desk by forwarding this message to servdesk@dbm.state.md.us.
This email has been scanned by networkMaryland Antivirus Service for the presence of computer
viruses.