SOLVED Error when trying to switch PHP version

pmoby

Member
May 27, 2019
5
1
3
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: (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.
 

tmcstom

Member
Dec 31, 2014
21
4
53
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).
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
.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