• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk 12.5, Php 5.6, APCU and Opcode

VinnyT

Regular Pleskian
Anyone have any luck installing APCU on PHP 5.6 / Plesk 12.5 (latest)?

using "pecl install apcu", i get the following error:
pecl/apcu requires PHP (version >= 7.0.0-dev), installed version is 5.4.45

Any thoughts on this? Is there a way to change the default system php handler? Or should i be using Opcode as an alternative?
 
I found the instructions here: http://talk.plesk.com/threads/enable-apcu.333346/page-2#post-789681

and ran through the process but the PECL build failed. Error details below.


I also thought that using the plesk URL for the dev tools might work, (http://autoinstall.plesk.com/PHP_5.6.10/) -
but I am using PHP 5.6.15, and the autoinstall folders only go to 5.6.13.

Do i need to downgrade my PHP to 5.6.10?


/tmp/apcu/apc_cache_api.h:44: error: expected specifier-qualifier-list before ‘zend_string’
/tmp/apcu/apc_cache_api.h:53: error: expected specifier-qualifier-list before ‘zend_long’
/tmp/apcu/apc_cache_api.h:67: error: expected specifier-qualifier-list before ‘zend_long’
/tmp/apcu/apc_cache_api.h:82: error: expected specifier-qualifier-list before ‘zend_long’
/tmp/apcu/apc_cache_api.h:101: error: expected specifier-qualifier-list before ‘zend_long’
/tmp/apcu/apc_cache_api.h:139: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/tmp/apcu/apc_cache_api.h:140: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/tmp/apcu/apc_cache_api.h:141: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/tmp/apcu/apc_cache_api.h:142: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/tmp/apcu/apc_cache_api.h:216: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:223: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:230: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:236: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:245: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:250: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:272: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:290: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/tmp/apcu/apc_cache_api.h:390: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/tmp/apcu/apc.c:41:31: error: zend_smart_str.h: No such file or directory
/tmp/apcu/apc.c: In function ‘apc_flip_hash’:
/tmp/apcu/apc.c:336: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type
/opt/plesk/php/5.6/include/php/Zend/zend_hash.h:182: note: expected ‘void **’ but argument is of type ‘struct Bucket **’
/tmp/apcu/apc.c:336: error: too few arguments to function ‘zend_hash_get_current_data_ex’
/tmp/apcu/apc.c:338:61: error: macro "zend_hash_update" requires 6 arguments, but only 3 given
/tmp/apcu/apc.c:338: error: ‘zend_hash_update’ undeclared (first use in this function)
/tmp/apcu/apc.c:338: error: (Each undeclared identifier is reported only once
/tmp/apcu/apc.c:338: error: for each function it appears in.)
/tmp/apcu/apc.c:340:68: error: macro "zend_hash_index_update" requires 5 arguments, but only 3 given
/tmp/apcu/apc.c:340: error: ‘zend_hash_index_update’ undeclared (first use in this function)
/tmp/apcu/apc.c:345: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/opt/plesk/php/5.6/include/php/Zend/zend_variables.h:51: note: expected ‘struct zval **’ but argument is of type ‘struct zval *’
make: *** [apc.lo] Error 1
ERROR: `make' failed
 
Opcode is not an alternative for APCu.
Opcode keeps compiled php code in it's memory for later reuse.

APCu (APC User Cache) is available, in which all opcode caching abilities have been removed to support user caches in shared memory using the familiar APC API

So APCu is somthing like Memcached or Redis
 
Sorry, i was going to ask a separate opcode question -- but my main issue is getting apcu installed.
 
Ok, solved it!!

Thanks so much to @UFHH01 for the help!!!

I was trying to install the wrong APCU.

UFHH01 said:
Here is some helpful info on getting everything going

These two mirror server might help, if you have difficulties with the Plesk - autoinstaller - mirror:

http://www2.frugalware.org/mirror/autoinstall.plesk.com/

ftp://ftp.hosteurope.de/mirror/autoinstall.plesk.com
**************************************************

... you might be intersted in using these URLs, if you desire the Plesk - dev - packages:

http://www2.frugalware.org/mirror/autoinstall.plesk.com/PHP_5.6.16/

or

ftp://ftp.hosteurope.de/mirror/autoinstall.plesk.com/PHP_5.6.16/
**************************************************


Afterwards, please note, that the best way to install additional modules is to use FULL commands, to avoid issues and misconfigurations. Please remember to CHECK your depending pecl - configuration, if you experience issues:

Recommended commands:

/opt/plesk/php/X.X/bin/pear config-set php_ini /opt/plesk/php/X.X/etc/php.ini
/opt/plesk/php/X.X/bin/pecl config-set php_ini /opt/plesk/php/X.X/etc/php.ini
/opt/plesk/php/X.X/bin/pecl config-set php_bin /opt/plesk/php/X.X/bin/

/opt/plesk/php/X.X/bin/pecl install PECL_NAME_FOR_YOUR_MODULE


Check your PECL - configuration:

/opt/plesk/php/X.X/bin/pecl config-show



If you experience any issues, please keep in mind to CHECK your errors/issues/problems, instead of just using commands from others. In your case, you want to install APCu for PHP 5.6, but the latest APCu - version is only compatible for PHP 7.0 and higher. Please see:https://pecl.php.net/package/APCu .
http://php.net/manual/de/install.pecl.pear.php

For PHP 5.6 and the PECL - APCu - version 4.0.10, you could use:

/opt/plesk/php/5.6/bin/pecl install apcu-4.0.10

or

/opt/plesk/php/5.6/bin/pecl install channel://pecl.php.net/apcu-4.0.10
Here is what worked for me:

/opt/plesk/php/5.6/bin/pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini
/opt/plesk/php/5.6/bin/pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini
/opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin/
/opt/plesk/php/5.6/bin/pear config-set php_suffix ""

/opt/plesk/php/5.6/bin/pecl install apcu-4.0.10

 
Last edited:
Back
Top