How to Change the PHP handler using the Rebuild_phpconf script

August 21, 2024 / Web Design & Development

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:

  1. Use SSH to log onto the server.
  2. Execute the subsequent command in accordance with your needs:
    1. To determine the handler in use:
      # /usr/local/cpanel/bin/rebuild_phpconf –current
    2. To check every PHP handler that is on the server:
      # /usr/local/cpanel/bin/rebuild_phpconf –available
    3. To modify the existing PHP handler to “DSO”:
      # /usr/local/cpanel/bin/rebuild_phpconf 4 dso none 1
    4. To modify the current PHP handler to “SuPHP”:
      # /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
    5. To alter the current PHP handler to CGI:
      # /usr/local/cpanel/bin/rebuild_phpconf 5 none cgi 1
    6. To change the current PHP handler to FastCGI:
      # /usr/local/cpanel/bin/rebuild_phpconf 5 none fcgi 1
  3. 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.

Spread the love