PHP

PHP Version

Desde la sección PHP -> Versión PHP del menú izquierdo puedes elegir cuál versión de PhP quieres utilizar, siendo 8.1 la recomendada.

Configurar versión de PHP

Configurar versión de PHP

De momento no hemos forzado el uso de esta versión ya que podrías tener instaladas aplicaciones propias que podrían no ser compatibles y dejar de funcionar, como por ejemplo versiones antiguas de Drupal. Por otro lado Owncloud actualmente no tiene soporte para Php 8.1, por lo tanto, si tienes instalada esta aplicación, no podrás utilizar la versión más nueva de Php. En siguientes release eliminaremos la opción de utilizar php 7.4 que ya está obsoleta.

Php-Fpm Pools

PHP-FPM (FastCGI Process Manager) is an alternative to PHP FastCGI that achieves on the one hand enhanced security and on the other hand to improve the performance of PHP applications.

It’s about separating each application from the other by assigning it a different PhP Pool. Each Pool will have a different owner so that the user of one php application will not be able to read or write files from another application, thus limiting the possibility that an infected infected website will end up compromising others.

For each Pool, several child processes are spawned. In MaadiX we have applied the configuration known as dynamic. This means that the number of child processes are dynamically assigned to a given Pool depending on the number of requests (visits) that a website is receiving. In this way, performance is improved because the system resources can be allocated according to usage.

By default in MaadiX, 3 Pools are activated automatically, so that you have them immediately available for allocation. However, from the control panel, you can add others. The maximum number of Pools that can be created depends on the amount of memory available on the server.

Managing Pools

To manage the Pools go to the page System > PHP-FPM POOLS. From this page you will be able to add, delete or deactivate Pools from the system. In the table you will see the existing Pools and the domain that they have associated (in case they have any). You will always see at least three Pools (fpm1, fpm2 and fpm3). These are the three Pools that are created by default and that you will not be able to delete.

We recommend that you use these three Pools before adding others and do not assign more than one application to the same Pool in order to keep them isolated from each other.

In case you need to create additional Pools, you can do it using the form at the bottom of the page.

Añadir Pools

Creating new Pools

In order to delete a Pool completely you need to deactivate it first. You will only be able to deactivate a Pool from the third Pool onwards as long as it does not have any associated domain.

Once a Pool is deactivated you can delete it as long as it does not exist a higher numbered Pool. In other words, you will not be able to delete Pool fpm4 if Pool fpm5 exists. This is why it is good practice to assign Pools to your PhP applications sequentially.

As shown in the image below, the only option available for fpm4 will be to reactivate it. In order to remove it, you would have to first deactivate and delete fpm5.

Managing Pools

Managing Pools

Once created, Pools can be assigned to the different domains you have enabled from the control panel by accessing the ‘edit’ page of each domain. It is highly recommended to assign only one domain per Pool.

The Php applications installed from the control panel (Nextcloud, Owncloud, Limesurvey, etc) are automatically configured to use a separate pool from the others.