The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Backend PHP version

Discussion in 'General Discussion' started by sparek-3, Jul 18, 2011.

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I am noticing that the PHP version on the backend (used by cPanel, WHM, Webmail, etc) is outdated on our servers. It is version 5.2.6.

    I noticed that the file

    /var/cpanel/easy/apache/profile/makecpphp.profile.yaml

    does not appear to be set for PHP 5.2.17 (the last PHP 5.2).

    Should this be set and recompile with /scripts/makecpphp

    Note, I am using /var/cpanel/usecpphp
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    What are you using to determine that the backend PHP version is outdated? I'm interested in what area or command is being used to be certain it isn't a cached output that you are getting.

    Thanks!
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Well. Put a phpinfo.php in /usr/local/cpanel/base/frontend/x3 with the appropriate phpinfo code

    PHP:
    <?php phpinfo(); ?>
    Then log into a cPanel account and change the URL to go to the phpinfo.php file you created.
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I suppose a better way to word this question might be, is there a reason that the internal PHP binary is 5.2.6 and not 5.2.17? Is there something within the cPanel/WHM/Webmail that is not compatible with 5.2.17 and needs 5.2.6.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    When I ran /scripts/makecpphp, it updated it to 5.2.9 rather than 5.2.6, so do you actually mean 5.2.9 for the version?
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The internal PHP binaries in /usr/local/cpanel/3rdparty/bin are indeed 5.2.6. These binaries are primarily intended for compatibility with the various PHP Applications (e.g. Horde) we provide. If you have specialized needs you can use scripts/makecpphp to build a newer binary, which is placed in /var/cpanel/3rdparty.

    You can customize the profile used to build the /var/cpanel/3rdparty/bin/php binaries by using EasyApache.

    NOte: we are evaluating updating the internal PHP binaries to 5.3 in 11.34.
     
  7. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It looks like 5.2.9 is the highest this will go.

    Setting /var/cpanel/easy/apache/profile/makecpphp.profile.yaml to use 5.2.17 and running /scripts/makecpphp falls back to 5.2.9.

    Is there a particular reason why this won't go up to 5.2.17? I know there have been some security issues with PHP, thus the reason for staying up to date with the latest version. This is less of an issue because this is only referring to the backend, someone would have to have a cPanel/WHM/Webmail login to take advantage of it.
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Touch /var/cpanel/easy_skip_cpanelsync before running makecpphp. This flag file prevents scripts/cpanel_easy_sanity_check from downloading the cPanel EasyApache profiles.
     
  9. brettbh

    brettbh Registered

    Joined:
    Aug 27, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Since the makecpphp.profile.yaml gets completely overwritten without the /var/cpanel/easy_skip_cpanelsync file But adding that file will cause php to never update how do you purpose we can both keep up to date but still be able to modify this file without the changes getting overwritten. There has to be a better way. Perhaps have the sanity check download to another name and then merge with this file?? Profiling in phpMyAdmin now requires TTF to be enabled. I also have ZIP enabled. I manage to many servers to have to periodically brick over my settings to get an updated profile for new versions and then add my settings back.
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Since cPanel & WHM don't normally rebuild the internal PHP automatically, you only need to the /var/cpanel/easy_skip_cpanelsync flag file in place when you initiate makecpphp.

    For now I would recommend you make a back up of the profile you use to generate the internal PHP binary. Once makecpphp is complete and you are satisfied with the results, remove the easy_skip_cpanelsync flag file. When ever you need to make changes to the internal PHP binary, restore the profile, touch the flag and perform you changes and build.

    For cPanel & WHM 11.34 we will provide PHP 5.3 instead of 5.2.
     
Loading...

Share This Page