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.

eAccelerator apply custom patch via EasyApache

Discussion in 'EasyApache' started by chiefme, Nov 15, 2013.

  1. chiefme

    chiefme Member

    Joined:
    Jan 21, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    According to these articles eAccelerator is not compatible with anonymous function/closure.
    https://github.com/eaccelerator/eaccelerator/issues/12
    eAccelerator and PHP closures don’t mix

    Then trying to use anonymous function in PHP always get fatal error, this also happens then installing latest Joomla version:
    PHP sample code:
    Code:
    <?php
    $rs = array_map(function($r){
    return $r->type;
    },$array);
    ?>
    
    Error:
    Code:
    Fatal error: Invalid opcode 153/1/8. in /home/user/public_html/somefile.php on line 13
    It is possible to compile custom patch to eAccelerator via EasyApache?
    If i place a patch to this directory /home/cpeasyapache/src/eaccelerator/patches-applied and run an EasyApache, will it apply this custom patch?


    Or maybe there is any other solution without disabling eAccelerator.

    Thank you for your answers.
     
    #1 chiefme, Nov 15, 2013
    Last edited: Nov 15, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Have you considered using the other possible solution offered for that issue? The link to the report you provided shows that one user resolved the issue by modifying the "eaccelerator.optimizer" value in /usr/local/lib/php.ini. You can verify this value on your system with the following command:

    Code:
    grep eaccelerator.optimizer /usr/local/lib/php.ini
    It should show a value of "1" for this configuration. Modify this value to "0" to resolve the issue, per the report you provided.

    Thank you.
     
Loading...

Share This Page