Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Error when trying to switch PHP version

Discussion in 'EasyApache' started by pmoby, May 27, 2019.

  1. pmoby

    pmoby Registered

    Joined:
    May 27, 2019
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Paris
    cPanel Access Level:
    Root Administrator
    Brand new site on a Cpanel server provided by the French provider OVH.
    A few sites installed before, and all worked fine including for that same feature that now seems to fail:
    When trying to change the default PHP version from 5.6 to 7.1, I get

    (Error in fact much longer but nothing relevant I guess).
    The site contents is a simple site delivered in SSH by Git.
    Any idea why this is, and how to fix it ? Thanks.
     
  2. tmcstom

    tmcstom Member

    Joined:
    Dec 31, 2014
    Messages:
    16
    Likes Received:
    3
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I would double check the permissions are set correctly on the user data/site content, specifically the .htaccess file (/home/mydomainherefr/public_html/.htaccess).
     
  3. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,466
    Likes Received:
    505
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    .htaccess permissions does indeed seem to be the issue based on the error you're getting as well:

    Code:
     Permission denied at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 174. Cpanel::Transaction::File::Base::new("Cpanel::Transaction::File::Raw", "path", "/home/mydomainherefr/public_html/.htaccess", "permissions", 420, "restore_original_permissions", 1) called at /usr/local/cpanel/Cpanel/WebServer/Supported/apache/Htaccess.pm line 190 
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. pmoby

    pmoby Registered

    Joined:
    May 27, 2019
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Paris
    cPanel Access Level:
    Root Administrator
    The .htaccess file had indeed been delivered by SSH or GIT and was owned by root, it seems CPanel cannot change PHP version in that case. Updated and worked, thanks.
     
    cPanelLauren likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice