Re: php4 and php5 on the same apache server
| From: | Erwin Kerk | Date: | Mon, 13 Sep 2004 17:55:54 +0000 |
| Subject: | Re: php4 and php5 on the same apache server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196540@lists.php.net to get a copy of this message | ||
Jacob Friis Larsen wrote:
How can I run both php4 and php5 on the same apache server? Could I do it like this: AddType application/x-httpd-php .php AddType application/x-httpd-php5 .php5 And somehow tell php5 to use application/x-httpd-php5The approach I use is as follows: On port 80 I run an Apache instance with PHP4 On port 81 I run an Apache instance with PHP5 Via an Apache rewriterule I rewrite all .php5 calls to the other webserver (by proxy), and therefore transparent. Like this (not sure, dont have the config at hand right now): RewriteEngine On RewriteRule (.*)\.php5$ http://%{HTTP_HOST}:81$1.php Erwin Kerk Webdeveloper