Migration PHP4 to PHP5

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
25,033
Location
California
We're wondering if we should keep offering PHP Version 4 (PHP4)

While we've been provisining new servers with PHP Version 5 (PHP5) for some time now, older servers still run PHP4, and in the past we've moved only new clients and those who request PHP5, to the newer PHP5 servers.

We'd like to move completely away from PHP4, but we're wondering if we should just force the move to PHP5 on everyone, or if we should give the choice. After all we can always keep one or two servers provisioned with PHP4.

So, if you're forcing the move on your clients, if you'd please answer these questions it may be helpful to me and to others as well:

Have you given your clients the choice of staying on PHP4 or moving to PHP5?

How much advance notice do you give your clients of a forced move to PHP5?

Have any of your clients had any problems which they've reported back to you?

Thanks.

Jeff
 
We allow our customers to stay with PHP4 as an option, because one of our CMS, that we promote (though we are not its developers) and allow to install from within directadmin is a commercial product with limited period of updates. So the old versions require PHP4 and don't work with PHP5.

And still it will be an issue for us to migrate to 5.3.x. Of course if it was a free-source CMS, we would probably suggest its upgrading, and then we would switch off PHP4. Thus we would force the move on our clients, because it might be a question of security.

I know for sure, that some versions of CMS, such as Joomla, osCommerce, need to be updated or manually fixed to make them work with PHP5/MySQL5. And how many other CMS are there which require update? So not all customers even know name of CMS, with the help of which a site is made, what to say about the version?

Several times we upgraded a CMS for our customers with upgrading PHP/MySQL versions, and according to terms of our contract, it was not for free.
 
@zEitEr:
Would you mind telling me which commercial CMS that is?

Everyone else:

Anyone else care to comment on continuing to offer PHP4?

Thanks.

Jeff
 
Yes, sure, we know it under name of Amiro.CMS. Have you ever heard anything about it? We've been using it since version 3.8, and it supports PHP5 since 5.x, if I remember it correct.
 
I don't know anything about it, but I'd like to learn. They don't list a phone number on their site, and not even in their Whois. so I don't know how to contact them, and there's no information on their site about how their hosting provider plan works. If you have any information, or contact information, please email me so I can learn more.

Thanks.

Jeff
 
Since PHP4 is EOL we have stopped providing PHP4 on our systems. We have send all our customers a news mail where they should look for, and that they need to change the scripts that doesn't work with PHP5.

We have them (I can remember) 1 month or 2 for changing the scripts. After that we removed PHP4 and installed PHP5 only.

A few customers forgot to read the news mail or checked the site about it, but almost 95% had no problems after changing to PHP5.

I should say remove PHP4 and provide PHP5. Its also more safe if you stop providing PHP4
 
@zEitEr:

I've heard from Evolve Systems by telephone, and they showed me some very high pricing. $2,450 for the license, then each user has to pay. At least that's what it looks like. If so, then it's well beyond what I want to pay for trying out offering a site builder.

I could be very wrong about the pricing model; the Gent I spoke to still hasn't called me back. I hope to hear from him tomorrow.

@daveyw:

I'm leaning in the same direction.

Thanks to both of you.

Jeff
 
Jeff, I guess it a price for platform (CMS Builder), that's not a single license for a single site. Anyway if you're interested I can help you or consult you by email.
 
We started with offering informing our clients that changes where going to happen. We prepared everything so PHP4 was running as CGI and as module, so clients could create a .htaccess file to use PHP4 in CGI mode (CLI was default). After some time we replaced PHP4 module with PHP5 module, at this moment PHP4 as CGI and PHP5 as module. A few months later we informed the clients that it was time to drop PHP4 support and 1 month later we dropped PHP4 support. This way clients could test if everything should work with PHP5 before actually moving and they could fix issues before we forces them to use PHP5.

Currently we are planning to upgrade to PHP 5.3 (from PHP 5.2) and we are thinking about using the same option again...
 
Sounds like an interesting way to go. Our newer machines run php5 with mod_ruid2, so the only way we could run php4 on them would be in cgi mode. I hesitate to do that; it's a resource hog. But maybe...

How would you set up php5.3 as mod_ruid and php5.2 as cgi? Would you? Why or why not?

Thanks.

Jeff
 
Im thinking about do exact the same way, 5.2 as cgi 5.3 with mod_ruid and php version selector plugin (very useful for switch user between versions).

My doubt is just about mod_ruid... php as cgi doesnt use suphp? is not mandatory? If isnt so mod_ruid should keep working correctly.

Ill do some test if i got some times tomorrow on a text box and ill write here results.

Regards
 
PHP as CGI means usage of mod_suphp.

mod_suphp can not be used together with mod_ruid within a single virtualhost.

It means you won't be able to switch versions in .htaccess without modifying virtualhost's settings.
 
mod_ruid2 work at apache level afaik.. but maybe with customized users in httpd.conf should be used.. but.. would be hard to customize so much...

So, there no way to mix 2 version of php into same box with mod_ruid, unless (and if to test and not sure) you customize every user httpd i suppose.

Do you agree with this zeiter?

Regards
 
I'm not sure, that I understood you correctly, though I'll go on with my thoughts. I've tried to use mod_ruid with mod_suphp together, I've tested and checked it some time ago.

Since in /usr/local/suphp/etc/suphp.conf you specify an user, under which apache is running:

;User Apache is running as
webserver_user=apache

mod_suphp will allow requests only from that user. And as we all know with mod_ruid apache runs all requests as regular user (account owner), so mod_suphp will give an error when it gets a request from any other user, except that specified in the config.

Thus, if you need to have an ability to switch versions you should add a custom tocken into httpd templates and check it then...

Code:
|*if PHP_CGI="1"|
        SuexecUserGroup |USER| |GROUP|
       <IfModule mod_suphp.c>
         suPHP_Engine |PHP|
         suPHP_UserGroup |USER| |GROUP|
       </IfModule>
|*else|
        # SuexecUserGroup |USER| |GROUP|
        <IfModule mod_ruid2.c>
        RMode config
        RUidGid |USER| |GROUP|
        RGroups apache
        </IfModule>
|*endif|

And then you'll be able to change PHP_CGI on a page "Add Custom Httpd Configurations"

p.s. You should verify it. I did not test it.
 
Last edited:
Well, your example and your reply is totally about what i was trying to say :) Just my english sometimes is not good as my mind is thinking :D

Thanks for sharing that, for sure the if on virtual_host2.conf would solve (or at least help) on have 2 different httpd configuration depending on which version is user using.

Thanks
 
So someone is going to figure this all out and let us know how to do it, right :) ?

Jeff
 
Ill try this way probably monday, i need two file with commands for 5.2 and 5.3 for have correct tests but im not a programmer.

ill try with a customer backup :P
 
Just noticed that is impossible to install php 5.2 and 5.3 via custombuild.. thats whould be another problem.. any idea?

Ill check the other way (sed on deprecated functions with new) but i dont think is safe...

How should i install 5.2 and 5.3 from custombuild using one cgi and one cli?
 
Back
Top