Re: Using php4 AND php5
| From: | Bostjan Skufca @ domenca.com | Date: | Mon, 04 Oct 2004 12:18:05 +0000 |
| Subject: | Re: Using php4 AND php5 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198586@lists.php.net to get a copy of this message | ||
Compile another apache apache with php5 and make it listen on port 81, use
different pid file and different error_log, recompile your current apache
with modules mod_rewrite and mod_proxy and mod_proxy_http enabled. Then make
current apache forward all .php5 requests to second apache via proxy module
like this:
RewriteEngine On
RewriteRule (.*)\.php5$ http://%{HTTP_HOST}:81$1.php [P]
(add this to each virtual host definition)
the trick about logs is that everything is logged with your primary apache
server, so you do not need to open all vhost logs on your secondary apache -
you need errorlog though :)
regards,
Bostjan
On Monday 04 of October 2004 13:44, Dobermann wrote:
> Hi all,
>
> I'd like to know how to install both php 4 and 5 on the same server,
> for example with .php4 and .php5 extensions.
>
> I tried editing some part of the source code to change the way Apache
> calls php (with application/x-httpd types) but I never get apache to
> start :(
>
> I heard about compiling one version as module and the other as cgi but
> did not try myself...
>
> If anybody has an idea... :)
>
> Thanks
> dob