Error changing PHP version
Were unable to change the PHP version on one domain name. The error appears to relate to a .htaccess file. The .htaccess file has correct permissions (0644) and ownership.
Error: (XID h5ymd3) 1 error occurred: Error #1: The system failed to apply the "PHP" version to "example.com": Cpanel::Exception::IO::FileCreateError/(XID pm97cr) The system failed to create the file "/.htaccess.lock" (as EUID: 823, EGID: 834 834) because of the following error: Permission denied at /usr/local/cpanel/Cpanel/SafeFile.pm line 376. Cpanel::SafeFile::_safelock("/.htaccess") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 557 Cpanel::SafeFile::_safe_open(undef, 66, "/.htaccess", CODE(0x39e6098), "safesysopen") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 214 eval {...} called at /usr/local/cpanel/Cpanel/SafeFile.pm line 213 Cpanel::SafeFile::safesysopen(undef, "/.htaccess", 66, 420) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 128 Cpanel::SafeFile::safesysopen_no_warn_on_fail(undef, "/.htaccess", 66, 420) called at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 130 Cpanel::Transaction::File::Base::new("Cpanel::Transaction::File::Raw", "path", "/.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(0x398f3a8), "userdata", -
Did you check the file ownership? Try; chown -R username:username /home/username/public_html/.htaccess0 -
As I mentioned in my post, The .htaccess file has correct permissions (0644) and ownership. 0 -
Is there an .htaccess file in /home or /home/user not just /home/user/public_html? 0 -
Is there an .htaccess file in /home or /home/user not just /home/user/public_html?
There is no .htaccess file in /home and all .htaccess files in this particular /home/user * have correct permissions and ownership.0 -
Could you try doing ls -la of the .htaccess in /home/user and /home/user/public_html? 0 -
Could you try doing ls -la of the .htaccess in /home/user and /home/user/public_html?
Well I have obviously already done that to check the ownership and permissions ;) But thanks anyway.0 -
I wanted you to post it here. Could be that you're missing something. Are you able to change the PHP version if you set chmod 777 on the .htaccess? 0 -
ls -lah public_html/.htaccess -rw-r--r-- 1 user user 593 Jan 22 2018 public_html/user/.htaccess
Changing .htaccess permissions to 777 makes no difference.0 -
What are the permissions for /home/userdir and subfolders? Looking further at the error, it seems like it can't create the .htaccess.lock file. Something could seem like the user can't write in the directory. 0 -
The domain in question is an addon domain in /public_html so the permissions are 750 with sub directories of 755. The domains dir is written to daily so no problem there. 0 -
But what are the permissions in /home/userdir? It seems like cPanel is trying to create /.htaccess.lock, so it could seem like cPanel is creating it in the homedir. 0 -
The permissions are all OK. This user has several addon domains, all but one can have different versions of PHP. As mentioned above, the problem domain is in /public_html so the permissions are 750 with sub directories of 755 0 -
As it doesn't seem we're getting too far with this through this avenue, can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. Thanks! 0 -
Ticket ID 12638593 This has now been resolved. What was happening is that the domain name in question is an addon domain but it had two config files in /var/cpanel/userdata/username It should only have one. Sean Malen corrected this by moving the domains files. 0 -
I had a similar problem on one of my servers.. Same thing - seemed to have correct file permissions etc.. So I simply made a backup of the rogue .htaccess file causing it, deleted said .htacces, file. Then made the update from multiphp manager (which worked without any error) and then uploaded the .htaccess file again. 0
Please sign in to leave a comment.
Comments
15 comments