• How to use the cPanel MultiPHP Manager to change PHP Version

    OpenVZ VPS
    The latest version of cPanel now includes the cPanel MultiPHP Manager, the ability to change the php version your website uses from your cPanel interface. In the past to achieve this you had to use a 3rd party addon which was developed by a company called 1h software. This unfortunately didn’t work correctly with the new paper_lantern theme. By default, and if we installed cPanel for you will have three PHP versions to offer
    PHP 5.6
    PHP 7.0
    PHP 7.1
    You can add more php versions by using Easy Apache 4 but to change to an already installed php version login to the cPanel account of the domain you want to use a different php version and click “MultiPHP Manager”
    cPanel MultiPHP Manager
    From this page, tick the domain name you want to modify the php version for. If you have addon domain names these will also be listed here. Once you have selected the domain name on the right hand side you will now notice a drop down box, here you can choose the php version for the domain in question and click apply.
    cPanel MultiPHP Manager






    After you have clicked apply cPanel will then add a line to the domain in questions .htaccess file redirecting the server to use the requested php version. It’s not yet possible to specify the php version on a per folder basis automatically using your cPanel account but you can do this manually. If you want specific folders to use different php versions you can add a .htaccess file to each folder and specify the version of php required as below.
    Default:

    # php -- BEGIN cPanel-generated handler, do not edit# Set the “ea-php70” package as the default “PHP” programming language.<IfModule mime_module>  AddType application/x-httpd-ea-php70 .php .php7 .phtml</IfModule># php -- END cPanel-generated handler, do not edit
    # BEGIN cPanel-generated php ini directives, do not edit# Manual editing of this file may result in unexpected behavior.# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)<IfModule php7_module>   php_flag display_errors On   php_value max_execution_time 60   php_value max_input_time 60   php_value max_input_vars 1000   php_value memory_limit 32M   php_value session.gc_maxlifetime 1440   php_value session.save_path "/var/cpanel/php/sessions/ea-php70"   php_value upload_max_filesize 2M</IfModule># END cPanel-generated php ini directives, do not edit


    For PHP 7.1, add the below to your .htaccess file
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php71” package as the default “PHP” programming language.
    <IfModule mime_module>
     AddType application/x-httpd-ea-php71 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
    For PHP 7.0, add the below to your .htaccess file
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php70” package as the default “PHP” programming language.
    <IfModule mime_module>
     AddType application/x-httpd-ea-php70 .php .php7 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit

    For PHP 5.6, add the below to your .htaccess file
    # php -- BEGIN cPanel-generated handler, do not edit
    # Set the “ea-php56” package as the default “PHP” programming language.
    <IfModule mime_module>
     AddType application/x-httpd-ea-php56 .php .php5 .phtml
    </IfModule>
    # php -- END cPanel-generated handler, do not edit
  • 2 comments:

    FAVOURITE LINE

    To steal ideas from one is plagiarism. To steal from many is Research.

    ADDRESS

    Mumbai , Maharashtra

    EMAIL

    shikha.pathak6@gmail.com
    shikha.the.swt.pari@gmail.com

    Skype

    shikha_pari