phpubuntupleskapcu

Installing PHP 7.1 APCu Extension on UBUNTU 16.04


I am trying to load apcu with php 7.1 in ubuntu 16.04, i have done the following steps:

sudo apt-get install software-properties-common python-software-properties
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -s php-apcu
sudo bash -c "echo extension=apcu.so > /opt/plesk/php/7.1/etc/php.d/apcu.ini"
sudo bash -c "echo extension=apc.so > /opt/plesk/php/7.1/etc/php.d/z_apc.ini"
sudo service apache2 restart

the installation was successful but it doesn't load in phpinfo, can anyone help?


Solution

  • Just install plesk-php71-devel, make, gcc on your Plesk server. Then run:

    /opt/plesk/php/7.1/bin/pecl install apcu
    echo "extension=apcu.so" > /opt/plesk/php/7.1/etc/php.d/apcu.ini
    plesk bin php_handler --reread
    

    And you will see loaded acpu module with:

    /opt/plesk/php/7.1/bin/php -m | grep apcu