Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP5.6 and APC installation

Tags:

php

apc

How to install APC under PHP 5.6?

APC is installed

apt-get install php-pear php5-dev make libpcre3-dev
pecl install apc

# locate apc.so
/usr/lib/php5/20100525/apc.so

APC is added to php.ini

extension=apc.so

But APC is not mentioned in output from phpinfo()

Fatal error: Call to undefined function apc_fetch()
like image 259
clarkk Avatar asked Nov 08 '14 15:11

clarkk


Video Answer


2 Answers

APC is (more or less) a deprecated package (the last release, 3.1.14, was unstable and had to be rolled back). It has been replaced by the core package opcache.

I'm not sure about Debian flavors (all my searches return the PECL library while opcache is native to 5.6) but in CentOS you have to install the php-opcache package, which contains the opcahce.so file.

like image 196
Machavity Avatar answered Sep 24 '22 19:09

Machavity


It works for me

yum install php56w-pecl-apcu
like image 30
Rjazhenka Avatar answered Sep 25 '22 19:09

Rjazhenka