Webserver using PHP 5.4 despite being set to 5.6
Hi,
One of our customers contacted us about some PHP extensions that wasn't enabled despite being enabled under 'Select PHP version'. I quickly saw that his website (which is an addon domain with document root in /domainfolder) was using PHP 5.4, despite being set to 5.6. This was not the issue with his primary domain from the public_html folder.
What could be causing this issue?
-
Hello, Is this system using EasyApache 4? Are any third-party applications such as CloudLinux with PHP Selector installed? Have you verified the domain name in-question resolves to the cPanel server? Thank you. 0 -
Hello, It's using EasyApache3 on CloudLinux. I've checked that the website is indeed resolving to the cPanel server. 0 -
Hello, EasyApache 3 does not support MultiPHP functionality, suggesting the use of PHP Selector on the system: CloudLinux Documentation Please review the above document from CloudLinux to ensure you are using it correctly on the system. Thank you. 0 -
I'm a bit confused. I might've misunderstood what MultiPHP is then. It works fine in the public_html folder (also switching PHP version), so I don't understand why it won't use the same version on an addon domain. 0 -
MultiPHP is only offered with EasyApache version 4. You're using PHP Selector with CloudLinux, which is a third-party application developed by CloudLinux and not cPanel. What's the .htaccess file within the subdirectory associated with the addon domain name look like? There's an article here you may find helpful: Different PHP versions per directories using SuPHP " CloudLinux KnowledgeBase Thank you. 0 -
There's no .htaccess, it seems. Well, I upgraded to EasyApache 4 and everything worked right after. 0 -
There's no .htaccess, it seems. Well, I upgraded to EasyApache 4 and everything worked right after.
I'm happy to see it's now working well. Feel free to let us know if we can be of any further assistance. Thanks!0 -
Hi Michael, Thanks for replying so quick! I got one more question. I see that php_value are not allowed in .htaccess with EasyApache4 - does this mean every account has to have a php.ini file where php values are set? 0 -
I got one more question. I see that php_value are not allowed in .htaccess with EasyApache4 - does this mean every account has to have a php.ini file where php values are set?
It's still allowed if you are using DSO as your PHP handler. The following document is helpful as well: The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation Additionally, feel free to review this post: In Progress - EA4 php.ini/local.ini behavior Thank you.0 -
Oh, I just couldn't find DSO under PHP Extensions. According to interface (WHM Home >> Software >> EasyApache 4). Keep in mind you can only use DSO as the handler for one version of PHP on your system. Thank you.
0 -
Hi, I already tried that. There's no DSO PHP package. 0 -
Hello, The DSO package for PHP with EasyApache 4 is named with the "-php" suffix. For example, the DSO package for PHP 7.0 is: ea-php70-php You'd search for php70-php when installing it via the EA4 interface in WHM, or install it via the command line with a command such as: yum install ea-php70-php
Note that you can only run one DSO package at a time. Thanks!0 -
Hi, Thanks! I installed the DSO package for 5.6 as this is the most used by our clients. I must say that I really like the 'new' way of doing it in EA4. Would it be safe to remove PHP Version Selector using yum groupremove alt-php? Would that mess something up? 0 -
Would it be safe to remove PHP Version Selector using yum groupremove alt-php? Would that mess something up?
It's possible it will change the way PHP is configured for your existing accounts and addon domain names. Ensure you review the documentation for PHP Selector and EasyApache 4 provided by CloudLinux before removing it: PHP Selector > Control Panel Integration > cPanel Thank you.0 -
Hi, It seems like the upgrade to EasyApache4 caused more problems than I had thought. If we downgrate to EasyApache3 using /scripts/migrate_ea3_to_ea4 --revert --run, does everything then work as before? 0 -
Yes, it reverts the last EasyApache 3 profile that was built. That said, are there any specific issues with EasyApache 4 that you'd like us to help troubleshoot? Thank you. 0 -
Hi Michael, It wasn't really issues with EasyApache4 (although navigating was different) - it was our clients. Some were using PHP 5.4, some PHP 5.6, and some PHP 7. This caused a lot of issues as all of them used the one we set as default. Some clients' websites broke down. I need to read more about EasyApache4 before I make the change. Your help is much appreciated, though! 0
Please sign in to leave a comment.
Comments
18 comments