Re: Using php4 AND php5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux