Your PHP handler and SuExec configuration can be modified in WHM >> Apache Configuration >> PHP and SuExec Configuration, but if you’d like to make your change via SSH, you can use rebuild_phpconf.
Note: with this utility, you can not add new handlers, or enable an alternate PHP version if it’s not installed. You’d need to use EasyApache to enable that change.
What’s my current configuration?
# /usr/local/cpanel/bin/rebuild_phpconf --current
Available handlers: suphp dso cgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: suphp
SUEXEC: enabled
Let’s say I wanted to switch to DSO, keeping PHP4 disabled, and SuExec enabled:
# /usr/local/cpanel/bin/rebuild_phpconf 5 none fcgi 1
For reference, the usage details:
Usage: /usr/local/cpanel/bin/rebuild_phpconf [--dryrun] [--no-restart] [--no-htaccess] [--current|--available]
--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