Topic: Problems with extensions and fpm

Hi,

I'm using your repository and I really like the posibility to use different versions of php in parallel. Great work!

But I'm facing a problem. I'm using nginx with php-fpm (on CentOS7) an php versions 5.4 (from centos) and 5.5 (from your repo). Every site has its own fpm-pool, with own users, settings, etc. and nginx useses the correct socket per site.

One pool needs many PHP extensions (mysqli, oci8, snmp, ldap, ...) so I'm trying to make this available to just this one by uncommenting the modules in eth/php.d/$MODULE.ini and adding it to the pool in etc/php-fpm.d/$POOL.conf like:
php_admin_value[extension] = oci8.so
php_admin_value[extension] = snmp.so
php_admin_value[extension] = ldap.so

After restart of the php-fpm service only this pool sees the extensions and everything works for some minutes/request (I'm not sure exactly how long..). But suddenly it stops working and throws errors like "Fatal error: Call to undefined function oci_connect()". phpinfo() shows the modules as present. After a restart of the fpm service it is ok again.

Am I doing something wrong?

Re: Problems with extensions and fpm

Sorry, settings extension per pool is not possible.
If php55-php-snmp package is installed, the extension will be enabled for all pools.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problems with extensions and fpm

Too bad. I found this in the php bugtracker (https://bugs.php.net/bug.php?id=68171). OK, it's outdated, but in the beginning it seemed to work.

Maybe I could use php_admin_value[disable_functions] as a possible solution or do you think it is overall not a good idea to control the extensions/functions per site?

Regardless of a possible solution I would thank you for your quick response and your work on this repository.

Re: Problems with extensions and fpm

php_admin_value[disable_functions] could be a workaround.

Other solution is to run 2 instances of fpm, with a different configuration... and so, different set of extensions, but perhaps a bit ugly.

> Regardless of a possible solution I would thank you for your quick response and your work on this repository.

smile

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi