# OPCache configured !?

**URL:** <https://help.nextcloud.com/t/opcache-configured/210533>\
**Category:** ℹ️ Support\
**Tags:** nc30\
**Created:** [November 22, 2024, 1:44pm UTC](https://help.nextcloud.com/t/opcache-configured/210533 "2024-11-22T13:44:48Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ernolf](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ernolf/32/77874_2.png) [@ernolf](https://help.nextcloud.com/u/ernolf)\
**Post date:** [November 22, 2024, 4:57pm UTC](https://help.nextcloud.com/t/opcache-configured/210533/5 "2024-11-22T16:57:58Z")

</div>

> [@cr9cA](#):
>
> My PHP version is 8.2 and my tree is  
> /etc/php/8.2/cli/php.ini

That is the php.ini from your cli SAPI. So that one only has effect for cron jobs and occ commands.

You should know, which php-SAPI is used by your webserver.

SAPI stands for “Server API” (API stands for “Application Programming Interface”). It is the mechanism that controls the interaction between the “outside world” and the PHP/Zend engine.

These are the most important SAPIs:

Command Line Interface

- term - **cli**
- package - _`php<VER>-cli`_
- description:  
cli is used by PHP scripts that are called from the command line. i.e. all processes that were explicitly NOT called by the web server (cron jobs, occ commands, etc.)

Apache2 module (a.k.a. Apache2 Handler)

- term - **apache2**
- package - _`libapache2-mod-php<VER>`_
- description:  
the apache2 module is the default SAPI for apache2. The downside is that it’s not particularly scalable and doesn’t support http2.  
libapache2-mod-php relies on the old but stable Multi-Processing Module (MPM) “mpm-prefork”.

Fast Process Manager

- term - **fpm**
- package - _`php<VER>-fpm`_
- description:  
this is the default SAPI used by nginx.  
On apache2 php-fpm relies on the more scalable threaded MPM “mpm-event”. Additionally it needs the apache2-modules “proxy\_fcgi” and “setenvif”.

Every SAPI has its own php.ini file:

```
  /etc/php/<VER>/<SAPI>/php.ini

```

If your webserver is apache2, you can find out the active mpm (Multi Processing Module) with this command call:

```auto
sudo apachectl -M 2>/dev/null | grep mpm

```

as explained above, the “mpm\_event\_module” means that apache2 speaks via fpm, while the “mpm\_prefork\_module” indicates that the apache2 module is used for the comunication between webserver and php.  
Since only one mpm module can be loaded in the core of apache2, _`libapache2-mod-php<VER>`_ and _`php<VER>-fpm`_ are mutually exclusive.  
You should know which of both is used to tweek the right php.ini file.

* * *

So if your webserver uses the apache2 handler, then you should tweek:

```
  /etc/php/8.2/apache2/php.ini

```

while if your web server uses the Fast Process Manager, then you need to look here:

```
  /etc/php/8.2/fpm/php.ini

```

h.t.h

* * *

Bon chance,  
ernolf

---

_[View the full topic](https://help.nextcloud.com/t/opcache-configured/210533)._
