RE: [PHP4BETA] co-exist instance
| From: | Mike Robinson | Date: | Thu, 13 Jan 2000 18:29:09 +0000 |
| Subject: | RE: [PHP4BETA] co-exist instance | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9114@lists.php.net to get a copy of this message | ||
Hi,
> can php4 co-exist with php3 ? ( in Apache under Linux )
> thx for answering,
Another unsung feature, yes indeed it can.
You'll require at a minimum php-3.0.13 and php-4beta3 to accomplish this.
Compile both versions as per the instructions, and add:
--enable-versioning
to the configure line you are using, on both versions.
Note that each version requires its own module/addtype lines in httpd.conf.
Each version also requires its own filename extension. For example, in my
httpd.conf...
LoadModule php4_module lib/apache/libphp4.so
LoadModule php3_module lib/apache/libphp3.so
and later on.....
AddModule mod_php4.c
AddModule mod_php3.c
Then for types, you could have...
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .php4s
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .php3s
You can configure these however you like, just make *sure* you don't pass
the same file type to 2 different handlers.
Another thing I do is change the directives between versions and restart
apache so I can check code against both versions. Its quite neat, and the
whole thing works quite well on my linux box.
I even run a cgi version of php3 in tandem, for messing-around purposes. :)
There are some resources in the mailing list archive if you require more
info.
Good luck.
Mike Robinson
-----------------------------------------------------
"Sometimes two [harmless] words, when put together
strike fear in the hearts of men - Microsoft Wallet."
Dave Gilbert, Velocet Communications