PHP-FPM custom configuration for subdomain
Hello everyone,
I have a customer which needed to enable the "exec" function in PHP 7.0. What I did was to edit the following file:
/opt/cpanel/ea-php70/root/etc/php-fpm.d/subdomain.domain.com.conf
I removed "exec" from php_admin_value[disable_functions].
The problem is that at the top of the file, there's the following message:
; NOTICE This file is generated. Please use our WHM User Interface
; to set these values.
Ok, but where do I edit it in WHM? I didn't find the page to do this.
I can find only the main PHP.ini configuration, which already has disable_functions empty.
-
Hello @andreluiz, It's not currently possible to modify the value using Web Host Manager (though that is planned for a future version). We have a guide on how to make the change for an individual domain (or subdomain) at: Let me know if following the instructions on the above resource helps. Thank you. 0 -
Well, I did as described in the guide. Apparently, it didn't work because phpinfo still showed exec inside disable_function, but the PHP script worked normally as if exec was not disabled. That's strange, anyway, just in case, I did the same thing I did in my first post, just to guarantee that exec will work. 0 -
Apparently, it didn't work because phpinfo still showed exec inside disable_function, but the PHP script worked normally as if exec was not disabled.
Hello @andreluiz, This is an artifact of how PHP and PHP-FPM work together. It's noted under the Caveat - PHP_INI_SYSTEM mode section in the linked resource. Thank you.0
Please sign in to leave a comment.
Comments
3 comments