eAccelerator apply custom patch via EasyApache

chiefme

Member
Jan 21, 2009
13
0
51
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.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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.