PHP Tutorials

Installing PHP APCu Backwards Compatibility Plugin

The APCu Backwards Compatibility (apcu-bc) plugin include the backward compatibility with APC PHP 7+

apcu-bc plugin came into existence since PHP 7.0, since APCu stopped providing the full backward compatibility support along with APCu in PHP 5.5 and 5.6.

How to Install APCu Backwards Compatibility Plugin on PHP 7.0, 7.1, 7.2?

You must have APCu installed in your machine to use apcu-bc. Remember you can’t install apcu-bc unless you have installed APCu.

Then log in to your server as a root user using SSH credentials.

sudo apt-get -y install gcc make autoconf libc-dev pkg-config

sudo pecl7.X-sp install apcu_bc

After successful installation, don’t forget to generate a configuration file for a PHP extension. Hit the below command in terminal to restart the PHP.

# Replace php7.X-sp => X with your PHP version

sudo bash -c "echo > /etc/php7.X-sp/conf.d/z_apc.ini"
sudo service php7.X-fpm-sp restart

How to Verify the Installation?

Enter the below command in the terminal, to check whether apcu-bc is working perfectly

# Replace php7.X-sp => X with your PHP version
php7.X-sp -i | grep -i "APC Compatibility"
# Following will be the output:
APC Compatibility => 1.0.3

How to Uninstall the apcu-bc Extension in PHP?

You have to login your server as a root user to uninstall apcu-bc extension.

sudo rm /etc/phpX.Y-sp/conf.d/z_apc.ini
sudo peclX.Y-sp uninstall apcu_bc

Finally, use the given below command to restart the PHP-FPM.

sudo service phpX.Y-fpm-sp restart

I am Digamber, a full-stack developer and fitness aficionado. I created this site to bestow my coding experience with newbie programmers. I love to write on JavaScript, ECMAScript, React, Angular, Vue, Laravel.

Recent Posts

React Router DOM 6 Fetch Current URL / Pathname Tutorial

If you want to learn how to get the current route's name, component pathname or…

2 days ago

React Js Hide & Show with React Bootstrap Collapse Tutorial

React show and hide example. In this tutorial, we will show you how to step…

5 days ago

How to Integrate Tabs in React Js with React Bootstrap

Tabs are one of the best UI elements for displaying multiple contents in a single…

1 week ago

How to Build Toast Component in React Js with Bootstrap

In this tutorial, we will learn how to create a toast notification component in the…

2 weeks ago

React Js Bootstrap Modal Popup Component Tutorial

Bootstrap offers tons of custom UI solutions. On top of that, it is easy to…

2 weeks ago

React Build Counter using useReducer Hook Tutorial

React js counter using the useReducer hook example. In this post, we will learn how…

2 weeks ago