cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

What version of PHP is installed on your system?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
When's the last time you rebuilt Apache/PHP via EasyApache? Did you enable "Opcache" in the "Exhaustive Options List" for PHP? Are you using any custom php.ini files within the account?

Thank you.
 

Tobias Karlsson

Active Member
Jul 29, 2015
43
0
6
Sweden
cPanel Access Level
Root Administrator
When's the last time you rebuilt Apache/PHP via EasyApache? I did that today

Did you enable "Opcache" in the "Exhaustive Options List" for PHP? Yes

Are you using any custom php.ini files within the account? No i dont think so. I use this file: /usr/local/lib/php.ini
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Try uploading a PHPINFO file to the same directory the script is installed in. Review the php.ini path to ensure it's /usr/local/lib/php.ini.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

jndawson

Well-Known Member
Aug 27, 2014
343
38
78
Western US
cPanel Access Level
DataCenter Provider
We're getting almost the same error:
Code:
Zend OPcache requires Zend Engine API version 220121212.
The Zend Engine API version 220100525 which is installed, is outdated.
zend_extension has:
Code:
/usr/local/IonCube/ioncube_loader_lin_5.4.so, /usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so, /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so
php -v:
Code:
[ [email protected] ~># php -v
Zend OPcache requires Zend Engine API version 220121212.
The Zend Engine API version 220100525 which is installed, is outdated.

PHP 5.4.44 (cli) (built: Aug 15 2015 11:49:24)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
  with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd., and
  with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
We'll be updating php as soon as we confirm with customers that it won't break anything on their websites, but we'd like to get a handle on the error first so that we really don't break anything.

Would upgrading php correct the error?
Is ionCube php loader v4.7.5 the latest version cPanel provides?

thanks
 

cPMarkF

*nix Technical Analyst
Staff member
Feb 4, 2013
18
8
78
cPanel Access Level
Root Administrator
This error was due to both the newer and older versions of the OpCache extension being referenced in the server's php.ini:

Code:
[11:58:41 server [email protected] /usr/local/lib/php/extensions]cPs# grep opcache /usr/local/lib/php.ini
zend_extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20131226/opcache.so"  <=== (newer/correct version)
; See http://php.net/manual/en/opcache.installation.php
; opcache.memory_consumption=128
; opcache.interned_strings_buffer=8
; opcache.max_accelerated_files=4000
; opcache.revalidate_freq=60
; opcache.fast_shutdown=1
; opcache.enable_cli=1
opcache.memory_consumption=64
opcache.interned_strings_buffer=4
opcache.max_accelerated_files=7963
opcache.revalidate_freq=120
opcache.fast_shutdown=1
opcache.enable_cli=1
opcache.enable=1
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so" <=== (older version)
Because the older version of the module was referenced after the newer one, PHP was loading this last, thus causing the mismatch between versions and the loaded Zend Engine. Commenting out (using a semi-colon, not a pound sign) the reference to the older version stopped the wrong version from loading and the errors in the Apache log and PHP startup.
 

Michael-Inet

Well-Known Member
Feb 20, 2014
134
20
68
Nashville, TN, USA
cPanel Access Level
Root Administrator
Hi Mark,

tl:dr: What version of OpCache should we have?

I'm following this as I'm in the process of testing Drupal 7 sites on PHP 5.5. Brand new box, where I built EasyApache with Apache 2.4 and PHP 5.5.

CENTOS 6.7 x86_64 standard – srv07 WHM 11.50.0 (build 30)

Code:
[email protected] [~]# grep opcache /usr/local/lib/php.ini
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
; See http://php.net/manual/en/opcache.installation.php
; opcache.memory_consumption=128
; opcache.interned_strings_buffer=8
; opcache.max_accelerated_files=4000
; opcache.revalidate_freq=60
; opcache.fast_shutdown=1
; opcache.enable_cli=1
This is showing what you referenced as the older version. What version should I have with PHP 5.5, and if it's not the version I have, what cPanel function do I need to use to get it?

Thanks,
Michael

Edit
Code:
[email protected] [~]# php -v
PHP 5.5.29 (cli) (built: Sep 14 2015 10:57:05)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
  with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd., and
  with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
  with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
 

jndawson

Well-Known Member
Aug 27, 2014
343
38
78
Western US
cPanel Access Level
DataCenter Provider
Well, that wasn't much help, but I appreciate the response. This is what is in our php.ini file, which, based on Mark's example, is not the same:
Code:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525"
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.4.so"
zend_extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
zend_extension = "/usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so"
Would updating php to 5.5 or 5.6 correct the issue?
We're running WHM 11.50.1 (build 2), btw.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I'm following this as I'm in the process of testing Drupal 7 sites on PHP 5.5. Brand new box, where I built EasyApache with Apache 2.4 and PHP 5.5.
Could you let us know the specific error message you are receiving?

Would updating php to 5.5 or 5.6 correct the issue?
EasyApache should handle the installation if you enable "Opcache" in the "Exhaustive Options List" for PHP.

Thank you.
 

Michael-Inet

Well-Known Member
Feb 20, 2014
134
20
68
Nashville, TN, USA
cPanel Access Level
Root Administrator
Could you let us know the specific error message you are receiving?
I built EasyApache with Apache 2.4 and PHP 5.5.

This is showing what [cPMarkF] referenced as the older version. What version should I have with PHP 5.5, and if it's not the version I have, what cPanel function do I need to use to get it?

tl:dr: What version of OpCache should we have?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Please feel free to open a support ticket so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
To update, the correct version of OPcache that is installed by EasyApache is OPcache v7.0.6-dev.

Thank you.
 

kiti

Member
Sep 16, 2015
19
3
53
france
cPanel Access Level
Root Administrator
I had the same issue, and it was related to the fact that my /usr/local/lib/php.ini referred to two different versions of opcache.so at the same time in my php. I have fixed it by commenting the oldest one with ;

opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20131226/opcache.so"
;zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
zend_extension="/usr/local/Zend/lib/Guard-7.0.0/php-5.6.x/ZendGuardLoader.so"