Same PHP version for multiple releases

adam12

Verified User
Joined
Feb 19, 2016
Messages
59
I know this sounds absurd but bare with me: It would be great to have the same version of PHP allowed in multiple php?_release positions. Maybe it could be a no-op (path already exists so skip it?).

Here's my use case: I have php4_release currently unassigned, and php1_release set to 5.6. I need to start moving clients off the default 5.6 for new domains. I want to change php1_release to 7.3 or 7.4.

Ideally I just script something that walks through every domain config, setting the PHP version of domains that don't have a default set, to PHP=4, which I've gone ahead and set to 5.6 (the same as PHP=1).

Then once that's done, rewrite confs, everyone who was on PHP1 with 5.6 is now on PHP4 with 5.6 and I'm free to upgrade php1_release to the latest. No downtime.

Without this (correct me if I'm wrong), switch the versions in options.conf, ./build php d, then rewrite configs. During this time, clients with an explicit version of PHP1 or no explicit version (ending up on PHP1 by default) may end up on a super-new version of PHP until I have time to correct it.

Thoughts?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,146
Location
GMT +7.00
Hello,

1. Compile PHP 7.x as php4_release
2. Set php1_select=4 for user domains where you need PHP 7.x, and leave php1_select=1 with PHP 5.6 still
3. Overwrite settings

Now you have users domains working under PHP 7.x and PHP 5.6 is still the default. Then switch the versions:

4. Change php1_select=4 to php1_select=41 (temporary set to 41 in order to not mix users with real php1_select=1)
5. Change php1_select=1 to php1_select=4
6. Change php1_select=41 to php1_select=1
7. Compile PHP 7.x as php1_release and PHP 5.6 as php4_release
8. Overwrite settings

That's it.
 

adam12

Verified User
Joined
Feb 19, 2016
Messages
59
Thanks for the reply. It looks like a reasonable compromise. I'll give it a try.

Cheers.
 
Top