Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to set a very specific PHP version

Discussion in 'General Discussion' started by Jafar Muhammed, Jul 25, 2017.

  1. Jafar Muhammed

    Jafar Muhammed Active Member

    Joined:
    Mar 21, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
    I know that I have Easy Apache for choosing PHP versions like 55, 56, 70. However, my question is about to select a particular version number, say 7.0.6.

    What am I trying to solve?
    I have a Magento 2 powered web store. Magento 2 will not support every version of PHP 7.
    devdocs.magento.com/guides/v2.1/install-gde/system-requirements-tech.html
    Magento 2.1.x technology stack requirements | Magento 2 Developer Documentation

    Interestingly, it will not support 7.0.1 and 7.0.3. But it will support an in between version, 7.0.2. Since Magento's PHP version support isn't stable, I can't switch to PHP 7 using Easy Apache or Multi PHP Manager. When I am writing this thread, the current PHP Version is 7.0.21 on my server, and it can be upgraded at any moment, and my website may stop working because of the dependency.

    To solve, this, do we have any solutions like writing the specific PHP version number in a php.ini or .user.ini file? I realise that this could be a temporary solution; however, I see this is the only solution until Magento got all the PHP 7 versions covered.
     
    #1 Jafar Muhammed, Jul 25, 2017
    Last edited by a moderator: Aug 2, 2017
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    718
    Likes Received:
    122
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    No, not possible. There will only ever be one minor version of PHP installed on the server and being that cPanel likes to ensure there are no lurking security issues, they will always update to the latest minor version of PHP shortly after the release.

    PHP 7 specifically is up to minor release 7.0.21

    Rolling back to 7.0.6 brings back a whole slew of bugs and security related fixes.

    PHP: PHP 7 ChangeLog

    ctrl + f for CVE

    These are all security related fixes.

    You are better off waiting until Magento can fully support any release of PHP 7.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Jafar Muhammed likes this.
  3. Jafar Muhammed

    Jafar Muhammed Active Member

    Joined:
    Mar 21, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Alright @Jcats, I understand the concern. Thanks for the clarification.
    This thread is good to close.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    In addition to the earlier post, keep in mind that PHP version 7.0.21 is currently provided with EasyApache 4. This is supported by Magento per their documentation because it falls under support for PHP "7.0.6–7.0.x".

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Jafar Muhammed likes this.
  5. Jafar Muhammed

    Jafar Muhammed Active Member

    Joined:
    Mar 21, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Yes @cPanelMichael,

    My thought is about Magento's in between missing of support as I expressed in my first post.
    After discussing with my friends, I do understand that from PHP 7.0.6 to the current PHP Version 7.0.21 there is no missing of support.
    Based on this assumption, I switched to PHP 7. And I can acknowledge that the website is now much faster than a couple of hours ago.
     
    cPanelMichael likes this.
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    718
    Likes Received:
    122
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Should enable PHP-FPM as well, even more speed! ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Jafar Muhammed likes this.
  7. Jafar Muhammed

    Jafar Muhammed Active Member

    Joined:
    Mar 21, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
  8. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    718
    Likes Received:
    122
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Meh.. use Redis instead :)

    help.bigscoots.com/cpanel/cpanel-easyapache-4-installing-redis-and-redis-php-extension
    cPanel EasyApache 4 Installing Redis and Redis PHP extension

    devdocs.magento.com/guides/m1x/ce18-ee113/using_redis.html
    Using Redis With Magento Community Edition (CE) or Enterprise Edition (EE)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #8 Jcats, Jul 25, 2017
    Last edited by a moderator: Aug 2, 2017
    Jafar Muhammed likes this.
  9. Jafar Muhammed

    Jafar Muhammed Active Member

    Joined:
    Mar 21, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
  10. Jafar Muhammed

    Jafar Muhammed Active Member

    Joined:
    Mar 21, 2017
    Messages:
    26
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi @Jcats, Thanks a ton for your Redis installation tutorial. I installed Redis and connected Magento 2. No errors, except github.com/magento/magento2/issues/9875
    Redis Cache error · Issue #9875 · magento/magento2 · GitHub
    which I fixed.

    Now, I see, a much better performance.
     
    #10 Jafar Muhammed, Aug 2, 2017
    Last edited by a moderator: Aug 2, 2017
  11. iero

    iero Member

    Joined:
    Jul 2, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Please see my attached screenshot, I only see PHP71, i have no idea of the rest of the digits, could you please explain a little better if im selecting the right php version? thanks
     

    Attached Files:

    #11 iero, Jul 8, 2018
    Last edited by a moderator: Jul 8, 2018
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @iero,

    You are selecting versions of PHP in your EasyApache 4 profile that Magento supports. If you want to enable PHP 7.2, you'd need to enable that in your EasyApache 4 profile as well. You can assign PHP versions to specific accounts using WHM >> MultiPHP Manager.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice