Re: php 4 & php 5

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

 



> What I am trying to avoid is having 2 copies of the same program
> installed...

Well, if you're gonna have PHP 4 and PHP 5, you're gonna have to have two
copies of PHP...

You could run both under Apache 1.x, but running PHP 5 with Apache 1.x
means you aren't going to be taking advantage of any of the cool features
of 2.x anyway, so why do that?

Running 4 with Apache 2.x, same thing: PHP 4 doesn't leverage anything
cool from Apache 2.x, so you might as well take the safe road with Apache
1.x

For more accurate statements of the above, see:
http://us3.php.net/manual/en/faq.migration5.php
http://us3.php.net/manual/en/migration5.php

So, ideally, you'd be running:
PHP 4 + Apache 1.x
PHP 5 + Apache 2.x
if you want to try out new things in leading edge versions.

But let's assume you just want to test your PHP4 scripts in PHP5, which
would make sense.

You're only going to install Apache 1.x ONCE, but you're going to HAVE to
run 2 pools of httpd running to have PHP4 and PHP5 Modules installed,
probably.

Actually, I guess you could run PHP5 as a CGI, knowing that that will
automatically break a *few* things (HTTP Authentication, for example) but
test *most* of your scripts that way.

Compile PHP 5 as CGI, and use something like:
AddType application/x-httpd-php5 .php5

Then, in an .htaccess file where you have your PHP5 scripts you are
migrating, you could use:
<Files *.php>
  ForceType application/x-httpd-php5
</Files>

This would not be suitable for a heavy load production server, and you're
GOING to have some issues to track down where it's just CGI messing things
up, not PHP5, really, but it's do-able.

Maybe if you told us WHY you need 4 & 5 we'd have better answers for ya.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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