How to select PHP version

13 posts / 0 new
Last post
#1 Fri, 06/06/2008 - 11:40
Tito

How to select PHP version

Hello,

I currently have PHP4 and PHP5 installed on the server. I have allowed clients to be able to select which PHP version they want to use. Now, as a client (not admin), where is it that they can go to change PHP versions? I could not find it anywhere.

Thanks, G

Fri, 06/06/2008 - 23:06
sgrayban

It's under "Server Configuration" menu on the left. If it isn't there then you need to edit the server under "Administration Options" and enable it under "Allowed capabilities and features"

Sun, 06/07/2009 - 07:24 (Reply to #2)
Tito

I just checked those settings and they seem to be fine. I am still not able to find where to change PHP versions :-\. I have attached a screen-shot

Sun, 06/08/2008 - 12:11 (Reply to #3)
Sun, 06/08/2008 - 12:13 (Reply to #4)
Sun, 06/08/2008 - 19:19 (Reply to #5)
sgrayban

You don't show the menu on the left -- Expand "Server Configuration" menu on the left.

Mon, 06/09/2008 - 04:05 (Reply to #6)
Tito

"Server Configuration" on the left is expanded

Tue, 06/10/2008 - 00:25 (Reply to #7)
sgrayban

The VM pro is not detecting both php versions.

Are you sure that apache is loading _both_ modules ?

Tue, 06/10/2008 - 10:56 (Reply to #8)
Joe
Joe's picture

<div class='quote'>Are you sure that apache is loading _both_ modules ? </div>

If it were, Apache would be crashing on the first request it received. ;-)

You can't have two mod_php versions loaded into Apache at the same time. At least one has to run via CGI or FCGI (and I tend to prefer having both run that way, and not loading mod_php at all, as it dramatically reduces memory usage of the Apache processes).

--

Check out the forum guidelines!

Tue, 06/10/2008 - 11:19 (Reply to #9)
Tito

Joe,

Great stuff!!!...this fixed it! I am running CentOS 5, btw.

Tue, 06/10/2008 - 10:15
Tito

Apache is seeing both versions. When I go to &quot;Apache website&quot; settings in &quot;Server Templates&quot;, I am able to select either PHP4 or PHP5. I just can't see it in the left hand side menu where each client would be able to choose it themselves.

....weird...thanks for the help so far

Any more suggestions?

Tue, 06/10/2008 - 11:04 (Reply to #11)
Joe
Joe's picture

<div class='quote'>Apache is seeing both versions. When I go to &quot;Apache website&quot; settings in &quot;Server Templates&quot;, I am able to select either PHP4 or PHP5. I just can't see it in the left hand side menu where each client would be able to choose it themselves.</div>

It only appears if you have chosen CGI or FCGI execution for your PHP applications for the domain in question. I'd thought this was the default...maybe something wrong in our installer. What OS/version are you running?

To fix this:

Select the domain

Click the &quot;Website Options&quot; item in the &quot;System Configuration&quot; menu

Set &quot;Run CGI scripts as domain owner?&quot; to &quot;Yes&quot;

And set &quot;PHP script execution mode&quot; to CGI or FCGId (depending on whether you're on a system that has mod_fcgid or not--the FCGId option might not show up, if mod_fcgid isn't available...and that'd be the right thing for it to do)

Save it

Now you'll be able to choose PHP versions.

I recommend CGI or FCGId execution for any shared hosting system, because mod_php applications run as the Apache user--meaning that all users can see all other users stuff, via trivial scripting (&quot;safe mode&quot; isn't, so don't trust it to protect anything in a shared hosting environment).

--

Check out the forum guidelines!

Sat, 03/09/2019 - 14:31
noseboy

Ran into something similar a while ago. Is the php version set properly for the phpmyadmin directory under server config -> web options?

Topic locked