Today I will show you how to fix the issue when you get error while changing PHP version from cPanel.
While changing the PHP version from cPanel from, getting below error:
You will also get the same error, if you change the PHP version from WHM » Software » MultiPHP Manager.
As we all know that making any changes in PHP version, .htaccess file is getting updated. The ownership of .htaccess file is user:user (where user is the username of the cpanel account for the concerened domain). So if the ownership of the file is changed to any other cPanel username or root, then you will not be able to make any changes to .htaccess file from frontend. Moreover, you will also not be able to set redirection from cPanel, as in this case as well, the details are getting updated in .htaccess file. You will encounter the below error message:
As you can see that UID and GID are conflicting, as the .htaccess file has different username than the original. This is also the same case of mentioned above.
Make sure the ownership of the .htaccess file is user:user. If it is not, change the ownership by executing the below command:
chown user. .htaccess
chown user:user .htaccess
Note: where “user” is the cPanel username for concerned domain.
Once the ownership is set correctly, you will be able to change the PHP version from cPanel or WHM.
Here we came to know the importance of the .htaccess file and its ownership.
If you have any further question regarding this or if you get any other error while doing so, feel free to comment in the below comment section. I will be more than happy to help you.
Thank you. 🙂
My name is Shashank Shekhar. I am a Software Engineer, currently working in one of the leading web-hosting companies in India. I am having 2 years of experience in Linux Server Administration.
I love to work in Linux environment & love learning new things.
Powered by Facebook Comments