
Originally Posted by
mobcdi
My cpanel verison is listed as 11.24.5-RELEASE_38506 and the output of the other command is
Available handlers: suphp dso cgi none
Default PHP : 5
PHP4 SAPI: none
PHP5 SAPI: dso
SUEXEX: enabled
Does that mean to say that php5 isn't actually running under suphp as I first thought? and is it just a matter of switching it over from dso to suphp in Main >> Service Configuration >> Apache Configuration or should I really rebuild apache the configuration?
Yes; that is correct. While SuPHP support is compiled-in and available to use, the current configuration is not yet switched to utilize SuPHP.
The SuPHP configuration may be switched via WHM via the same menu path as you described:
WHM: Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration
It is also possible to switch via SSH using the same script that shows the current configuration, in a format as described from it help/usage output:
Code:
# /usr/local/cpanel/bin/rebuild_phpconf
Usage: /usr/local/cpanel/bin/rebuild_phpconf [--dryrun] [--no-restart] [--no-htaccess] [--current|--available] <Default PHP> <PHP4 Handler> <PHP5 Handler> <Suexec>
--dryrun : Only display the changes that would be made
--no-restart : Don't restart Apache after updating the php.conf link
--no-htaccess : Don't update user configurable PHP mime mapping.
--current : Show current settings
--available : Show available handlers and PHP SAPIs
<Default PHP> : Version of PHP to set as default handler for .php files
<PHP# Handler> : Type of Apache module to use in serving PHP requests
<Suexec> : enabled, disabled, 1 or 0
If PHP4 is not available, and if you wanted PHP 5 to be the default, using SuPHP, with SuExec, you could use a command like the following to accomplish the same change (to SuPHP) as would be done via WHM:
Code:
# /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
To see which versions of PHP are available, you could use the following ("--available"), similar to using the "--current" CLI switch.
Code:
# /usr/local/cpanel/bin/rebuild_phpconf --available