Re: Running two versions of PHP locally

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

 



On 5/19/06, John Hicks <johnlist@xxxxxxxxxxxxxx> wrote:

It looks like 'application/x-httpd-php' is the default type for php4.
Does php5 have a different type? Is there a way to explicitly assign a
new type to a module?

To be more explicit: When installing php5, what do I need to do to make
this configuration work:

<VirtualHost *:80>
         ServerName myPhp4domain.com
         DocumentRoot /allmydomains/myPhp4domain
        ...
         <Directory "/allmydomains/myPhp4domain">
                 AddType application/x-httpd-php .php
                ...
         </Directory>
</VirtualHost>

<VirtualHost *:80>
         ServerName myPhp5domain.com
         DocumentRoot /allmydomains/myPhp5domain
        ...
         <Directory "/allmydomains/myPhp5domain">
                 AddType <application type assigned to php5> .php
                ...
         </Directory>
</VirtualHost>

If this is possible, it would be a much cleaner upgrade path than mixing
a module and a cgi setup.


I may be wrong, but last time i checked, i remember reading that both the
php4 and php5 module use the same type and it was impossible to have them
both installed as modules in that way.  This was a while back, *right* when
php5 first came out, so things may have changed by now.

But that's pretty much why i went with a mixed Module/CGI approach, because
i didnt see any way (short of port proxying or file extensions, which i
didn't want to do just for aesthetic reasons) to get two concurrent modules
to play nice together.

After all, the goal is to be able to upgrade from php4 to php5,
gradually, on a domain-by-domain or even page-by-page basis. Forcing a
transition to cgi along with a transition to PHP5 compounds the
complexity of the task.


In my experience, there was no real difference between module php4 and CGI
php5 aside from a slight performance/memory hit for the CGI.  But i wasn't
running sites that got an insane amount of traffic, so i was quite willing
to take the small performance hit for the improvements offered by php5.

Also, i did this on a dedicated box i was in complete control of, not a
multi-user vhost.  There might be security implications for CGI php5 that
i'm not aware of, simply because i didn't use it in that context.

I'd be interested to know if anyone does get both php4 & php5 modules
installed together without file extention hints or port proxying.

--
Scott Hurring [scott dot hurring dot lists at gmail dot com]
http://hurring.com/

[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