• 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.

Enable APCu

Bogdan1

Regular Pleskian
Hey,

I installed APCu using pecl

"pecl install apcu"

APCu was installed successfully, but I can't enable it.
I created apcu.ini in : /opt/plesk/php/5.6/etc/php.d
apcu.ini contains this rows:

extension = apcu.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=128M
apc.ttl=3600
apc.user_ttl=7200
apc.gc_ttl=3600
apc.max_file_size=2M
apc.stat=0

Could you help me to enable it? Thanks

PS: In phpinfo(); I see included apcu.ini, but extension isn't enabled.
 
You have to install the extension in the context of the target php version.

Have a look at this post - you can simply adjust the script for your needs or run the corresponding parts manually.
 
Maybe the devel-packages are already installed on your system - since MU51 the devel-packages are not longer available for manual download.

You can check if they are already installed via...

yum list installed | egrep "^plesk-php[0-9]{2}-devel"

or

dpkg -l | egrep "^plesk-php[0-9]{2}-devel"

depending on your distribution.

EDIT: Just tested it with a fresh virtual machine - the devel packages are not installed by default and not longer available for download (access forbidden).
 
Last edited:
Maybe the devel-packages are already installed on your system - since MU51 the devel-packages are not longer available for manual download.

You can check if they are already installed via...

yum list installed | egrep "^plesk-php[0-9]{2}-devel"

or

dpkg -l | egrep "^plesk-php[0-9]{2}-devel"

depending on your distribution.

EDIT: Just tested it with a fresh virtual machine - the devel packages are not installed by default and not longer available for download (access forbidden).

Oh, but how to install extensions now? I want to use php 5.6, but APCu works only for php 5.4.
 
The devel packages are not available via package manager - just tested it again in my test-vm.
So you would have to do it manually.

Example for PHP 5.6.10:

#1 - Open http://autoinstall.plesk.com/PHP_5.6.10/ in your browser and determine the full url of the devel-package for your distribution, e.g. CentOS 7:

http://autoinstall.plesk.com/PHP_5....hp56-devel-5.6.10-centos7.15061519.x86_64.rpm

#2 - Download & install

cd /tmp
wget http://autoinstall.plesk.com/PHP_5....hp56-devel-5.6.10-centos7.15061519.x86_64.rpm
yum install plesk-php56-devel-5.6.10-centos7.15061519.x86_64.rpm

Note: If you are running debian or a debian based distribution, the command would be 'dpkg -i ...'
 
Hello,

we have followed the instructions of Oliver Meyer, but still experience the same problem of Bogdan1. apcu.ini is loaded, which I can see in the phpinfo(), but the module is not beeing loaded.

Would you please tell the steps one does have to follow? I am pretty sure that only installing all devel packages does not solve the problem.

Kind regards

Chris
 
Are you sure, that you have installed apcu in the context of the desired php version?

E.g. (for php 5.6.10, untested):

1. Install the corresponding php devel-package
2. Install apcu in the context of the right php-version:

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

3. Include the apcu-extension

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

4. Restart Apache

service httpd restart
or
service apache2 restart

5. Configure the desired vhost to use apcu

apc.enabled = 1
...
 
Hello Mr. Meyer,

thank you for your instructions. The problem is solved now.

After using "./pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini" i received an error, that the file apcu.so is not available. So I have used your instructions to install it in the right context, restarted apache and it worked perfectly.

Thank you very much.

Kind regards

Chris
 
Back
Top