Installing Alternative PHP Cache (APC)

joelkal

Verified User
Joined
May 11, 2012
Messages
6
Location
Athens, Greece
Hello,
I tried to install APC according to this article http://help.directadmin.com/item.php?id=400 but without any luck. :(

My setup is:
CentOS release 6.5 (Final)
PHP Version 5.5.13
with mod_php
Zend&ioncube enabled

When I follow the steps I gets errors like
Code:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘my_copy_class_entry’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:755: warning: assignment from incompatible pointer type
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘apc_copy_class_entry_for_execution’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:1956: warning: assignment from incompatible pointer type
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘apc_copy_trait_alias’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2379: error: ‘zend_trait_alias’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2380: error: ‘zend_trait_alias’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2380: error: ‘zend_trait_alias’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘apc_copy_trait_precedence’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2416: error: ‘zend_trait_precedence’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2417: error: ‘zend_trait_precedence’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2417: error: ‘zend_trait_precedence’ has no member named ‘function’
make: *** [apc_compile.lo] Error 1

and even if I ignore them and continue with 'make install' I get
Code:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘my_copy_class_entry’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:755: warning: assignment from incompatible pointer type
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘apc_copy_class_entry_for_execution’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:1956: warning: assignment from incompatible pointer type
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘apc_copy_trait_alias’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2379: error: ‘zend_trait_alias’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2380: error: ‘zend_trait_alias’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2380: error: ‘zend_trait_alias’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c: In function ‘apc_copy_trait_precedence’:
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2416: error: ‘zend_trait_precedence’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2417: error: ‘zend_trait_precedence’ has no member named ‘function’
/usr/local/directadmin/custombuild/APC-3.1.13/apc_compile.c:2417: error: ‘zend_trait_precedence’ has no member named ‘function’
make: *** [apc_compile.lo] Error 1

Any suggestion please?
 
PHP 5.5 comes with Opcache which is a replacement for APC. So, you should use Opcache instead of APC.
 
Thank you nmb for your comment, but I'd like to add that opcache could be enabled directly in the options.conf file.
 
Great thank you both!
I build opcache and works fine ;)

I'm a bit confused with the memcache and memcached are these php modules?
Should I build them as well?
 
Back
Top