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.

EasyApache 4 All PHP Options + OpCache

Discussion in 'EasyApache' started by Andrew W, Oct 19, 2015.

Tags:
  1. Andrew W

    Andrew W Member

    Joined:
    Apr 3, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Hello :)

    I'm currently using the All PHP Options + OpCache build using EA 4.

    This profile installs SuPHP from what I'm seeing atm. But isn't OpCache not compatible with SuPHP? Has this changed?

    I originally wanted to test EA 4 because MPM ITK was available. The build I had in my mind was Apache 2.4 + DSO + Opcache + MPM ITK.

    However, MPM ITK has it's own build without Opcache and Opcache has its own build with SuPHP.

    Is Opcache now compatible with SuPHP?

    I'm getting my information from slightly older documentation: PHP Extension: OPCache - EasyApache - cPanel Documentation

    Thank you anyone who can help answer my questions :)
     
  2. Andrew W

    Andrew W Member

    Joined:
    Apr 3, 2015
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    For anyone who stumbles across this I believe I found my answer.

    The "All PHP Options + Opcache" profile build in Easy Apache does indeed install SuPHP, but uses mod_cgi as the system default

    So Opcache should be compatible in that sense I believe, but when performing a search for the normal opcache code in /usr/local/lib/php.ini I found nothing. If anyone knows what's up with that please reply!

    This was found using the command "/usr/local/cpanel/bin/rebuild_phpconf --current"

    Output:

    Code:
    Available handlers:
            ea-php54: cgi suphp
            ea-php55: cgi suphp
            ea-php56: cgi suphp
    Configured handlers:
            ea-php54: cgi
            ea-php55: cgi
            ea-php56: cgi   (system default)
    Choosing the Add Handlers is not available via WHM through Easy Apache 4.

    Manage PHP Handlers in EasyApache 4 - EasyApache 4 - cPanel Documentation
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    No opcache extension is currently compatible with suPHP.

    Thank you.
     
  4. edigest

    edigest Active Member

    Joined:
    Nov 24, 2010
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    S. Pole
    cPanel Access Level:
    Root Administrator
    Just an FYI, OpCache works fine with LiteSpeed suPHP.
     
  5. greatwitenorth

    Joined:
    Feb 28, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Then why does the "All PHP Options + OpCache" option provided by cpanel install suPHP? Further, when I used that profile, the opcache extension for php wasn't even checked on. What is the recommended way in EasyApache 4 to install php with opcache?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The following document provides additional information on Opcode cachers in EasyApache 4:

    PHP Options - EasyApache 4 - cPanel Documentation

    You can change your PHP handler to DSO via "WHM >> Software >> MultiPHP Manager" after building the profile.

    Thank you.
     
  7. gfxpixeldesigns

    gfxpixeldesigns Registered

    Joined:
    Jul 14, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Its still not clear to me on how to setup OpCache using EA4.

    I have compiled the "All PHP Options + OpCache" EA4 build and made sure my PHP handlers are set to CGI mode.

    However the documentation states:

    "Opcode caching programs are not compatible with the suPHP or CGI PHP handlers"

    And i cant see any options to enable FCGI mode or any builds that support this handler.

    The documentation also states that we must manually configure OpCache:

    "The system does not automatically configure OpCache. If you do not manually configure OPCache after you install it, it will provide no benefits."

    I checked the usual location "/usr/local/lib/php.ini" for the OpCache code but as Andrew noted above this code was not present. From what i remember in EA3 the code was there but commented out so all we had to do was uncomment it.

    I did try adding the OpCache code manually but this only resulted in errors when starting php:

    "Cannot load Zend OpCache - it was already loaded"

    I also tried the same code using WHM > MultiPHP Editor with the same result.

    So what exactly is the correct way to set up OpCache in EA4? The documentation is not clear and the previous documentation for EA3 is no longer valid.
     
  8. edigest

    edigest Active Member

    Joined:
    Nov 24, 2010
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    S. Pole
    cPanel Access Level:
    Root Administrator
    You can find the opcache configuration in the MultiPHP configuration files, e.g.,

    /opt/cpanel/ea-php*/root/etc/php.d/
     
Loading...

Share This Page