Posts Tagged ‘PHP’

Checking PHP handlers from the command line

No Comments »

Here is an easy way to check the current PHP configuration:

/usr/local/cpanel/bin/rebuild_phpconf --currrent

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
: Version of PHP to set as default handler for .php files
: Type of Apache module to use in serving PHP requests
: enabled, disabled, 1 or 0

For an example, this will show the available PHP handlers on the system.

/usr/local/cpanel/bin/rebuild_phpconf --available

Just remember to be careful when running these commands as they can make big changes
that you may or may not expect.