• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » PHP 8.2 : How to Install the PHP APCu Extension

By Abhishek Ghosh April 4, 2023 6:03 pm Updated on April 4, 2023

PHP 8.2 : How to Install the PHP APCu Extension

Advertisement

Yes, PHP APCu Extension (Version 5.1.22 and newer) works with PHP 8.2. Installing and configuring APC (and APCu) on the Apache server was never just running one command. However, PHP 8 changed many things and installing and configuring APCu become more complex.

Our old article on Installing APC on PHP 7.2 shows how we used to install PHP APCu in the previous versions plus gives the idea of configuring and monitoring/visualization.

PHP 8.2 is a version which was released near the end of 2022. This is a major release of PHP. This version contains many new features, deprecated dynamic properties and performance improvements. We recommend you test your app and code with PHP 8.2 before upgrading to a production server. Especially for many WordPress plugins, there are breaking changes.

Advertisement

---

PHP 8-2 How to Install the PHP APCu Extension

This is the APCu we are talking about:

Vim
1
https://github.com/krakjoe/apcu/releases/tag/v5.1.22

 

Steps to Install the PHP APCu Extension

 

We will use the latest Ubuntu and Ondřej Surý’s PHP PPA to demonstrate. Ondřej invests a lot of time in Apache, PHP and many other server packages. Consider sponsoring him on GitHub, sponsorships start from $1/month:

Vim
1
https://github.com/sponsors/oerdnj

Install a few dependency packages before adding the repository:

Vim
1
2
sudo apt update
sudo apt install -y lsb-release gnupg2 ca-certificates apt-transport-https software-properties-common

Add Surý PPA to your system:

Vim
1
2
3
sudo add-apt-repository ppa:ondrej/php
# Press [ ENTER ]
sudo apt update

Install PHP 8.2 :

Vim
1
2
3
4
5
6
7
sudo apt install php8.2
# check
php -v && php --version
# install some modules
sudo apt install php8.2-{bcmath,xml,mysql,zip,intl,ldap,gd,cli,bz2,curl,mbstring,pgsql,soap,cgi}
# check the installed modules
php -m

In Apache, we can use mod_php to process PHP code directly. You need to install the Apache web server package, PHP, and Apache PHP extension:

Vim
1
2
3
sudo apt install apache2 libapache2-mod-php8.2
sudo a2enmod php8.2
sudo systemctl restart apache2

Install APCu:

Vim
1
pecl install apcu

You’ll get output like this:

Vim
1
2
3
4
5
6
7
8
9
pecl install apcu
downloading apcu-5.1.12.tgz ...
Starting to download apcu-5.1.12.tgz (105,890 bytes)
........................done: 105,890 bytes
39 source files, building
running: phpize
Configuring for:
...
...

Update the php.ini file located here :

Vim
1
/usr/local/etc/php/8.2

Open the PHP.ini file which is under Apache’s path, like :

Vim
1
nano /etc/php/8.2/apache2/php.ini

and edit like we did in the previous tutorial.

Add apcu extension in:

Vim
1
nano /usr/local/etc/php/8.2/conf.d/ext-apcu.ini

Add this:

Vim
1
2
[apcu]
extension= <path> see below

The will be like /usr/local/../php/8.2.4/pecl/20220829/apcu.so. To find it, run:

Vim
1
2
3
apt install mlocate
sudo updatedb
locate apcu.so

Restart Apache:

Vim
1
sudo systemctl restart apache2

You can check APC settings in the system with this command :

Vim
1
php -r 'phpinfo();' | grep -i 'apc'

If everything works fine then try the other settings from our old article.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to PHP 8.2 : How to Install the PHP APCu Extension

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • How To Install APC on PHP 7.2 (Ubuntu LAMP Server)

    APC is an Important Part For WordPress Like Web Software to Speed Up. Here is How To Install, Configure APC on PHP 7.2 on Ubuntu LAMP Server.

  • Optimize php ini for Rackspace Cloud Server (PVHVM)

    Here is a quick guide to optimize php ini for Rackspace Cloud Server (PVHVM) for higher performance and lower page loading speed.

  • Install PHP 7.2 on Ubuntu 18.04 LTS Running Apache2, Percona MySQL

    We Will Install PHP 7.2 on Ubuntu 18.04 LTS Running Apache2, Percona MySQL. That will create a typical LAMP server setup, enough to run PHP-MySQL web applications like WordPress.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy