How install apcu as php7 extension on debian

前端 未结 6 1087
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-12 21:18

I have seen this tutorial for ubuntu. http://thereluctantdeveloper.com/2015/12/quick-and-dirty-php-70-set-up-on-ubuntu-1404-with-apcu

It\'s not clear for me after st

6条回答
  •  不思量自难忘°
    2021-02-12 21:48

    Run :

    sudo apt-get install php7.0-dev
    pecl channel-update pecl.php.net
    pecl install apcu
    

    Do not immediately add extension=apcu.so on php.ini without checking. extension=apcu.so should automatically get added on /etc/php/7.0/cli/conf.d/20-apcu.ini. You can run php -i | grep app to check or cat /etc/php/7.0/cli/conf.d/20-apcu.ini. If you load twice, you'll get :

    PHP Warning:  Module 'apcu' already loaded in Unknown on line 0
    

    This message is probably kept for older system :

    install ok: channel://pecl.php.net/apcu-5.1.5
    configuration option "php_ini" is not set to php.ini location
    You should add "extension=apcu.so" to php.ini
    

    I can not comment on the existing answer (point is less than 50). I got that PHP error, then found that file.

提交回复
热议问题