In order to ensure correct configuration and updates of PHP settings across your server, aligning them with the intended handler, use the rebuild_phpconf script to adjust the PHP handler.
Follow the steps:
- Use SSH to log onto the server.
- Execute the subsequent command in accordance with your needs:
- To determine the handler in use:
# /usr/local/cpanel/bin/rebuild_phpconf –current
- To check every PHP handler that is on the server:
# /usr/local/cpanel/bin/rebuild_phpconf –available
- To modify the existing PHP handler to “DSO”:
# /usr/local/cpanel/bin/rebuild_phpconf 4 dso none 1
- To modify the current PHP handler to “SuPHP”:
# /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
- To alter the current PHP handler to CGI:
# /usr/local/cpanel/bin/rebuild_phpconf 5 none cgi 1
- To change the current PHP handler to FastCGI:
# /usr/local/cpanel/bin/rebuild_phpconf 5 none fcgi 1
- To determine the handler in use:
- Example: Type the following command to switch the PHP Handler for PHP 7.4 (ea-php74) to suPHP:
#/usr/local/cpanel/bin/rebuild_phpconf –ea-php74=suphp
You can change the PHP handler using the rebuild_phpconf script, and our technical support team is available 24/7 to assist you.
Learn how to set up specific file processing rules by How to Create Apache Handler in cPanel.