Error when trying to switch PHP version
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
[QUOTE]Error: (XID v4epc9) 1 error occurred: Error #1: The system failed to apply the "PHP" version to "mydomain.here.fr": Cpanel::Exception::IO::FileLockError/(XID 3qmv5x) The system failed to lock the file "/home/mydomainherefr/public_html/.htaccess" (as EUID: 514, EGID: 514 514) because of the following error: 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 Cpanel::WebServer::Supported::apache::Htaccess::_internal_set_handler(Cpanel::WebServer::Supported::apache::Htaccess=HASH(0x14d96e8), "lang", Cpanel::ProgLang::Supported::php=HASH(0x14fe428), "package", "inherit", "userdata",
(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.
(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.
-
I would double check the permissions are set correctly on the user data/site content, specifically the .htaccess file (/home/mydomainherefr/public_html/.htaccess). 0 -
.htaccess permissions does indeed seem to be the issue based on the error you're getting as well: 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 1900 -
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. 0
Please sign in to leave a comment.
Comments
3 comments