nvahalik

Registered
Jan 21, 2006
2
0
151
I currently have a server that is running swimmingly with PHP 4.4.1.

What I am attempting to accomplish is this:

I'd like to upgrade to the latest version and turn on the shmop and semaphore extensions so I can used shared memory. Also, I'd like to get PHP 5 running (cgi is fine) without disturbing the rest of the sites on the site. I'm limited to about 15 minutes of downtime for this project.

1. Can I turn on the shared mem from cPanel configure settings? It doesn't look like it.
1a. Is it possible to recompile PHP from source and not have it get overwritten if there is another upgrade?
1b. Is it possible to modify the build scripts to accomplish this so that any subsequent upgrades also have those settings? I wouldn't want apps using those to stop working after a night-time upgrade.

2. How easy (or hard) is to keep PHP4 the way it is and install PHP5 as CGI? Is this even possible?

3. Will cPanel support me if I attempt to do this and fail?

Thanks!
 

DigitalN

Well-Known Member
Sep 23, 2004
420
1
168
Hello,

1. Can I turn on the shared mem from cPanel configure settings? It doesn't look like it.
Not sure, I don't have access to a cPanel server, maybe someone else can help.

1a. Is it possible to recompile PHP from source and not have it get overwritten if there is another upgrade?
Well, sure you can recompile apache/php from source, either using cpanels scripts or your own .. no one is going to upgrade your apache without you knowing, you have to do this manually, its not an update that cpanel will do via a cron job :)

1b. Is it possible to modify the build scripts to accomplish this so that any subsequent upgrades also have those settings? I wouldn't want apps using those to stop working after a night-time upgrade.
Sure, as abaove, cpanel isn't going to update your apache and php for you automatically, you have to manually do it always .. use your own scripts or the cpanel installer .. doing that will overwrite php/apache, which is what you want, right?

2. How easy (or hard) is to keep PHP4 the way it is and install PHP5 as CGI? Is this even possible?
Yes you can run php5 as cgi or apache module on the same server running mod_php4 .. I keep meaning to post my better how to for that, running php4 + php5 (apache modules) with 2 apache servers both running on port 80/443. Maybe I will get the time soon to update my how to.

3. Will cPanel support me if I attempt to do this and fail?
I doubt it, but you never know :) (highly unlikely they would support what you are doing .. maybe you need someone to do it for you and they will support you.
 

webignition

Well-Known Member
Jan 22, 2005
1,880
0
166
nvahalik said:
How easy (or hard) is to keep PHP4 the way it is and install PHP5 as CGI? Is this even possible?
Dead easy.

There's a fantastic thread floating around the forums somewhere that details how you can have PHP4 and PHP5 both running as either Apache modules or in CGI mode or any combination you like - I think you'll find it here: http://forums.cpanel.net/showthread.php?t=45908

I have PHP4 and PHP5 both running as CGI and it works a treat.

After installing PHP5, make sure that you fiddle around with the php.ini to ensure that you have the same settings as your PHP5 installation - not having the default include path the same between the two versions confused me for a brief while!
 

nvahalik

Registered
Jan 21, 2006
2
0
151
Thanks

Well I followed that thread and it appears that the installation went flawlessly 'cept for one minor issue.

The box we have is RH9 and so libxml2 had to be upgraded. I used the DAG RPMs and everything seems to have gone just fine.

Thanks for the tip!