This way, you can customize your PHP files in multiple directories in your website to run on different PHP versions. htaccess files as possible, but each directory/folder can only have one. To update the version of that directory to 8.0, you do it as below.ĪddHandler application/x-httpd-ea-php80. Note that after the first 7, we have not included a dot(.) and after the second 7 we have not added a 4. To resolve the issue, run the following command: ln -s /opt/alt/php81/etc/mariadb103/pdomysql.so /opt/alt/php81/usr/lib64/php/modules/pdomysql. The above lines set the PHP version for the directory the. htaccess file.ĪddHandler application/x-httpd-ea-php74. Just right-click on it and select the " Edit" option to open it.Īdd the lines below to the. If there exists a file with that name, don't create another one. I suggest you first enable the showing of hidden files to make sure none exist before creating. Inside the directory, create a file and name it ". Step 3: Navigate to the various directories in File Manager in which you want to customize/change the PHP version. It provides a number of updates and improvements over previous versions of PHP. PHP 8 is the most recent major version released by php.net. Step 2: Click on the "File Manager" under the Files section However, changing from the Cpanel PHP Selector option worked fine. This document discusses the key changes and limitations of PHP 8 in EasyApache 4. htaccess file, which is a directory-level configuration file for Apache-based web servers. This tutorial will show you how to change your PHP version using our cPanel interface. How to customize PHP version for directories Your choice of several versions of PHP in your GreenGeeks account. In this article, I will show you how you can customize your PHP version for different directories in hosting cPanel account. You can select the Customize option on the Currently. This could be due to some legacy code in a certain directory within the website, which can only run on older PHP versions. How to set up Composer In order to use Composer, you must install several PHP modules. Log in to WHM panel as root and get the EasyApache 4 under the Software section by searching it. I have in the previous articles covered how to check which PHP version your website is running on, and how to change and update PHP version to a current and actively supported one.įor some reason, you may decide to have different sections of your website running on different PHP versions. I changed server and from cpanel i moved, all my sites before were in working fine with PHP8 and in the new server most sites are fine but 1 site is not. John Mwaniki / How to customize PHP version for different directories in cPanel
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |