• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Resolved Install PHP APC - plesk-php56

Hi IgorG,

Thank for your reply.

If I understood correctly, I must do this:

Code:
It's so easy!

1. Install all necessary packages for compiling apc module:

# apt-get install make plesk-php56-devel gcc glibc-devel zlib-devel

2. Compile apc module:

# /opt/plesk/php/5.6/bin/pecl install apc

3. Add extension to corresponding ini file:

# echo "extension=apc.so" > /opt/plesk/php/5.6/etc/php.d/apc.ini

4. Reread php handlers:

# plesk bin php_handler --reread

5. Go to Tools&Settings -> PHP Settings -> 5.6.xxxx

6. Enjoy the view of the installed apc module :)
 
I must do install:

1. Install all necessary packages for compiling apc module:
apt-get install plesk-php56-dev zlib1g-dev automake gcc libc6-dev

2. Compile apc module:
# /opt/plesk/php/5.6/bin/pecl install apc

3. Add extension to corresponding ini file:
# echo "extension=apc.so" > /opt/plesk/php/5.6/etc/php.d/apc.ini

4. Reread php handlers:
# plesk bin php_handler --reread

5. Go to Tools&Settings -> PHP Settings -> 5.6.xxxx
6. Enjoy the view of the installed apc module :)
 
When I use this I have a compilation error:

Code:
running: make
/bin/sh /tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/include -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/main -I/tmp/pear/temp/APC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/APC/apc.c -o apc.lo
libtool: compile:  cc -D_GNU_SOURCE -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/include -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/main -I/tmp/pear/temp/APC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/APC/apc.c  -fPIC -DPIC -o .libs/apc.o
/tmp/pear/temp/APC/apc.c: In function 'apc_search_paths':
/tmp/pear/temp/APC/apc.c:352:55: warning: passing argument 2 of 'php_stream_locate_url_wrapper' from incompatible pointer type
     wrapper = php_stream_locate_url_wrapper(filename, &path_for_open, 0 TSRMLS_CC);
                                                       ^
In file included from /usr/include/php5/main/php.h:399:0,
                 from /tmp/pear/temp/APC/apc.h:61,
                 from /tmp/pear/temp/APC/apc.c:34:
/usr/include/php5/main/php_streams.h:552:28: note: expected 'const char **' but argument is of type 'char **'
 PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, const char **path_for_open, int options TSRMLS_DC);
                            ^
/tmp/pear/temp/APC/apc.c:416:20: warning: assignment discards 'const' qualifier from pointer target type
         exec_fname = zend_get_executed_filename(TSRMLS_C);
                    ^
/bin/sh /tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/include -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/main -I/tmp/pear/temp/APC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/APC/php_apc.c -o php_apc.lo
libtool: compile:  cc -D_GNU_SOURCE -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/include -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/main -I/tmp/pear/temp/APC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/APC/php_apc.c  -fPIC -DPIC -o .libs/php_apc.o
/bin/sh /tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/include -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/main -I/tmp/pear/temp/APC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/APC/apc_cache.c -o apc_cache.lo
libtool: compile:  cc -D_GNU_SOURCE -I. -I/tmp/pear/temp/APC -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/include -I/tmp/pear/temp/pear-build-rootySJLUC/APC-3.1.13/main -I/tmp/pear/temp/APC -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/APC/apc_cache.c  -fPIC -DPIC -o .libs/apc_cache.o
/tmp/pear/temp/APC/apc_cache.c: In function '_apc_cache_user_update':
/tmp/pear/temp/APC/apc_cache.c:818:63: error: 'IS_CONSTANT_INDEX' undeclared (first use in this function)
             switch(Z_TYPE_P((*slot)->value->data.user.val) & ~IS_CONSTANT_INDEX) {
                                                               ^
/tmp/pear/temp/APC/apc_cache.c:818:63: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/temp/APC/apc_cache.c:820:22: error: 'IS_CONSTANT_ARRAY' undeclared (first use in this function)
                 case IS_CONSTANT_ARRAY:
                      ^
Makefile:186: recipe for target 'apc_cache.lo' failed
make: *** [apc_cache.lo] Error 1
ERROR: `make' failed
 
AFAIK, APC is no longer supported on PHP 5.5 and above. You can try to use ACPU with enabled full APC compatibility:

# /opt/plesk/php/5.6/bin/pecl install apcu-4.0.11
 
Thanks Igor.

For all, if you went install APC(U) on your plesk you do this:

Code:
1. Install all necessary packages for compiling apc module:
apt-get install plesk-php56-dev zlib1g-dev automake gcc libc6-dev

2. Compile apc module:
# /opt/plesk/php/5.6/bin/pecl install apcu-4.0.11

3. Add extension to corresponding ini file:
# echo "extension=apcu.so" > /opt/plesk/php/5.6/etc/php.d/apcu.ini

4. Reread php handlers:
# plesk bin php_handler --reread

5. Go to Tools&Settings -> PHP Settings -> 5.6.xxxx
6. Enjoy the view of the installed apc module :)
 
@IgorG ,

I have a problem.
I do not have APCU in the plesk interface

upload_2017-10-10_14-0-55.png

Code:
Build process completed successfully
Installing '/usr/include/php5/ext/apcu/apc_cache_api.h'
Installing '/usr/include/php5/ext/apcu/apc_pool_api.h'
Installing '/usr/include/php5/ext/apcu/apc_serializer.h'
Installing '/usr/include/php5/ext/apcu/apc_api.h'
Installing '/usr/include/php5/ext/apcu/apc_bin_api.h'
Installing '/usr/include/php5/ext/apcu/apc.h'
Installing '/usr/include/php5/ext/apcu/apc_sma_api.h'
Installing '/usr/include/php5/ext/apcu/apc_lock_api.h'
Installing '/usr/lib/php5/20131226/apcu.so'
install ok: channel://pecl.php.net/apcu-4.0.11
configuration option "php_ini" is not set to php.ini location
You should add "extension=apcu.so" to php.ini
root@web1:/opt/plesk/php/5.6/bin# echo "extension=apcu.so" > /opt/plesk/php/5.6/etc/php.d/apcu.ini
root@web1:/opt/plesk/php/5.6/bin# plesk bin php_handler --reread
The information about PHP handlers was successfully updated.
 
Last edited:
I did absolutely the same steps and I see:

Screenshot at Oct 11 15-04-18.png

Also I can see it with

# /opt/plesk/php/5.6/bin/php -m | grep apc
apc
apcu

Please re-check all your steps.
 
Back
Top