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

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”

Sorry, here is the link to the screenshot

http://picasaweb.google.com/daemonracing/Online/photo?authkey=eLsPgHG6Aik#5209620809226829122

You don’t show the menu on the left – Expand “Server Configuration” menu on the left.

"Server Configuration" on the left is expanded

The VM pro is not detecting both php versions.

Are you sure that apache is loading both modules ?

Apache is seeing both versions. When I go to “Apache website” settings in “Server Templates”, 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?

Are you sure that apache is loading _both_ modules ?

If it were, Apache would be crashing on the first request it received. :wink:

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).

Apache is seeing both versions. When I go to "Apache website" settings in "Server Templates", 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.

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 "Website Options" item in the "System Configuration" menu

Set "Run CGI scripts as domain owner?" to "Yes"

And set “PHP script execution mode” 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 (“safe mode” isn’t, so don’t trust it to protect anything in a shared hosting environment).

Joe,

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

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

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