How to Check and Set the PHP Handler using WHM?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Clay Page
    Member
    • Sep 2022
    • 82

    How to Check and Set the PHP Handler using WHM?

    Hello,

    Can anyone assist me with how to check and set the PHP Handler after Installation from the WHM panel?
  • Rex Maughan
    Senior Member
    • Mar 2022
    • 112

    #2
    Hello Clay Page,


    PHP handlers are Apache modules containing libraries for the Apache web server to utilize when running PHP code. Apache's PHP handlers are configured in the /etc/apache2/conf.d/php.conf configuration file. WHM comes with six PHP handlers.

    However, you can follow the ways below in order to check the present PHP versions/handlers,
    • Firstly, log in to SSH.
    • Then, enter the below command and execute it,
    /usr/local/cpanel/bin/rebuild_phpconf –current
    • Lastly, you'll get the following output,
    root@localhost ~ $ /usr/local/cpanel/bin/rebuild_phpconf –current
    DEFAULT PHP: ea-php70
    ea-php70 SAPI:suphp
    ea-php71 SAPI:suphp
    Thus, In this way, we can check the PHP handler after installation and set it to suPHP. You can also set the PHP Handler by running the rebuild_phpconf script,
    • You can use the following command to list all available PHP handlers on the server:
    # /usr/local/cpanel/bin/rebuild_phpconf --available
    • In order to set the current PHP handler to SuPHP:
    # /usr/local/cpanel/bin/rebuild_phpconf 5 none suphp 1
    For instance, if you want to set the PHP Handler for PHP 8.1 (ea-php81) to suPHP, execute the below command:

    #/usr/local/cpanel/bin/rebuild_phpconf --ea-php81=suphp
    Hence, by implementing the above ways, you can check the PHP handler after installation and set it to suPHP using WHM. However, If you face any issues, you can update it here.

    ------------------------------------
    Regards,
    Rex Maughan

    Comment

    Working...
    X