boa
boa copied to clipboard
How best to remove a function from php "disable_functions" list?
I found that Imagemagick module latest stable (3.3) on fresh vanilla Drupal 9 causes an error I think due to the function proc_get_status being disabled for security. (error here)
I'm wondering the best practice for allowing this function? It is my understanding that _PHP_FPM_DENY doesn't replace the disable_functions list, but rather adds to it. Thanks for any tips!
boa info command on Linode server: https://gist.github.com/leevh/6a83158b6272ba20dbe0b048bf27a16c
re-opening, this does seem to be my issue, after more testing.
Actually, I believe _PHP_FPM_DENY will replace the disable list and not add to it. From the documentation:
If _PHP_FPM_DENY is not empty, its value will replace default 'passthru', so any denied function must be listed explicitly.
I just thought I'd follow up, I did not find that this works. I'm currently running a script on cron to check and remove proc_get_status from disable_functions from both /opt/php74/etc/php74.ini
and /opt/php74/etc/pool.d/o1.conf
. It's a hack until I figure out a better way. Thanks though!
Looks like we have removed proc_get_status
in October 2022. Thanks!
Actually, I believe _PHP_FPM_DENY will replace the disable list and not add to it. From the documentation:
If _PHP_FPM_DENY is not empty, its value will replace default 'passthru', so any denied function must be listed explicitly.
_PHP_FPM_DENY
will replace only passthru