Install apcu php 7.4 ubuntu
← ServerPilot Docs Show
In the examples shown, replace "X.Y" with your app's PHP version (for example, "5.6" or "7.1"). The APCu extension adds object caching functions to PHP. APCu is the official replacement for the outdated APC extension. APC provided both opcode caching (opcache) and object caching. As PHP versions 5.5 and above include their own opcache, APC was no longer compatible, and its opcache functionality became useless. The developers of APC then created APCu, which offers only the object caching functionality (they removed the outdated opcache). Installing APCu on PHP 7.0, 7.1, 7.2, 7.3, and 7.4To install this extension on PHP 7.X, SSH in to your server as root and run these commands: sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo pecl7.X-sp install apcu When asked the following question, press Enter. Enable internal debugging in APCu [no] : Once installed, create a configuration file for the extension and restart PHP by running the following commands as root sudo bash -c "echo extension=apcu.so > /etc/php7.X-sp/conf.d/apcu.ini" sudo service php7.X-fpm-sp restart APCu for PHP 7+ does not support an option for full backwards compatibility with APC. If you require full backwards compatibility with APC and you're using PHP 7+, you'll also need to install the APCu Backwards Compatibility (apcu-bc) extension. Installing APCu on PHP 5.4, 5.5, and 5.6To install this extension on PHP 5.X, SSH in to your server as root and run these commands: sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo pecl5.X-sp install apcu-4.0.11 When asked the following questions, press Enter. Enable full APC compatibility [yes] : Enable internal debugging in APCu [no] : Once installed, create a configuration file for the extension and restart PHP by running the following command as root: sudo bash -c "echo extension=apcu.so > /etc/php5.X-sp/conf.d/apcu.ini" sudo service php5.X-fpm-sp restart Verifying the InstallationYou can verify APCu is installed correctly by running the command: phpX.Y-sp -i | grep apcu You should see output like the following: Additional .ini files parsed => /etc/phpX.Y-sp/conf.d/apcu.ini, apcu Uninstalling the APCu ExtensionTo uninstall this extension, as root run the commands: sudo rm /etc/phpX.Y-sp/conf.d/apcu.ini sudo peclX.Y-sp uninstall apcu Next, restart PHP-FPM with the command: sudo service phpX.Y-fpm-sp restart Last updated: October 8, 2018 1. Install php7.4-apcu packageLearn how to install php7.4-apcu package:
2. Uninstall / Remove php7.4-apcu packagePlease follow the step by step instructions below to uninstall php7.4-apcu package:
3. Details of php7.4-apcu packagePackage: php7.4-apcu Architecture: amd64 Version: 5.1.21+4.0.11-8+ubuntu20.04.1+deb.sury.org+1 Replaces: php-apcu (<< 5.1.21+4.0.11-8+ubuntu20.04.1+deb.sury.org+1~) Suggests: php-gd Provides: php-apcu Depends: php7.4-common, phpapi-20190902, libc6 (>= 2.14) Conflicts: php-xcache, php-yac Pre-Depends: php-common (>= 2:69~) Breaks: php-apcu (<< 5.1.21+4.0.11-8+ubuntu20.04.1+deb.sury.org+1~) Filename: pool/main/p/php-apcu/php7.4-apcu_5.1.21+4.0.11-8+ubuntu20.04.1+deb.sury.org+1_amd64.deb Size: 45036 MD5sum: a4881ba49f092ccf064ebdd4ede600b1 SHA1: 604479a0b689ccb0e9fdb98c7c833282f6cc0acc SHA256: 2cf1d46f91e444f51dfc10ffed979469d466025f9bde2334e09f7f36398a7f9c Description: APC User Cache for PHP Description-md5: 0d7462c8f566c71b65f0d4bcf7806445 First, I'm assuming you installed PHP7 using the DotDeb APT Repository. If not, this is how you should install it. Once PHP7 is installed and working properly, and assuming there are no other versions of PHP installed on the system, install
Just press enter if prompted to specify any configuration. answered Jan 3, 2016 at 8:13
WillWill 23.1k13 gold badges93 silver badges105 bronze badges 4 I know that this post is old but I would like to contrib with the way that works for me, because I tried the three answers in this question and I couldn't install APCU
successfully. My problem with the answers wasn't the installation of APCU, After research more in the search results I found a easy way to install it in
WPBullet. What I did was to install the packages
This works for me without manual writting in php.ini. Don't forget to restart apache2, or whatever you have as server. answered Oct 11, 2017 at 10:34
IvanhercazIvanhercaz 6621 gold badge10 silver badges29 bronze badges 4 Run :
Do not immediately add
This message is probably kept for older system :
I can not comment on the existing answer (point is less than 50). I got that PHP error, then found that file. answered Sep 19, 2016 at 3:31
Check /etc/php/(version like 7.2)/cli/conf.d directory and find 20-apcu.ini. If you dont see it there, You need to install it. To install follow bellow command:
Now add bellow line in php.ini file if it is not there.
Notice: for php7.2-apcu use your own php version. for example php7.0-apcu After install restart your php7.X-fpm service if you are using nginx
Now reload nginx
or reload apache, if you are using it:
answered Dec 10, 2018 at 17:23
Just installed APCu on a Ubuntu 14.04.3 LTS with PHP 7.0.3-2:
answered Oct 30, 2016 at 9:55
automatixautomatix 13k24 gold badges98 silver badges220 bronze badges I use Ubuntu 20.04 and php-fpm 7.4. To install apcu:
answered Jan 16, 2021 at 9:53
MawanMawan 836 bronze badges 1 for PHP7.3 use following commands
answered Mar 10, 2021 at 10:29
How to install APCu extension in php?How to Install APCu on PHP 7.0, 7.1, 7.2 ?. sudo apt-get -y install gcc make autoconf libc-dev pkg-config.. # Replace X with your php version number sudo pecl7.X-sp install apcu.. # Hit Enter in response to this question Enable internal debugging in APCu [no] :. How do I install APCu cache?Just follow these steps:. Step 1 : Login to Server. At first, we need to login to our server via SSH. ... . Step 2 : Install APCu. ... . Step 3 : Dependency Packages for APCu. ... . Step 4 : Restart Web Server. ... . Step 5 : APCu Admin Page. ... . Step 6 : Config APCu. ... . Step 7 : Store and Fetch Data.. What is APCu extension?The APCu extension adds object caching functions to PHP. APCu is the official replacement for the outdated APC extension. APC provided both opcode caching (opcache) and object caching. As PHP versions 5.5 and above include their own opcache, APC was no longer compatible, and its opcache functionality became useless.
What is APCu cache?APCu is a user-accessible PHP cache. Pantheon provides APCu by default across all plans, but the size of the APCu memory cache (apc. shm_size) varies depending on the service level. See the Application Containers overview to learn more about APCu on Pantheon's container architecture.
|