Author Topic: PECL extensions using PHP-FPM?  (Read 2719 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PECL extensions using PHP-FPM?
« on: July 22, 2021, 07:36:58 PM »
Hi chaps,

We have a server, installed as default and then upgraded to use the PHP-FPM selector.
I'm currently tasked with installing the PHP PECL Trader extension for a project, yet installing via CLI only installs for the default PHP version (5.6) and not the FPM selected PHP version.

PHP7.4 is set as the alias in the bash profile.
Tried adding flags to the PECL install, no luck.

Going via PECL extensions on the CWP admin also shows no available extensions, I've hit a brick wall.

Any suggestions? Thanks in advance!  :)

Offline
*
Re: PECL extensions using PHP-FPM?
« Reply #1 on: January 12, 2023, 10:01:44 AM »
same problem with trader.so and php-fpm

Offline
***
Re: PECL extensions using PHP-FPM?
« Reply #2 on: January 14, 2023, 11:33:24 PM »
In the CLI, you have to call the specific version of php-fpm you want, instead of just blindly calling php in the terminal. For example, call php 8.1 with no memory limit (as I often have to do with composer):
Code: [Select]
/opt/alt/php-fpm81/usr/bin/php -d memory_limit=-1
And for things that need to run as a specific user, instead of root:
Code: [Select]
sudo -u USERNAME /opt/alt/php-fpm81/usr/bin/php -d memory_limit=-1