PHP disable_functions not changing anything

shadowq

Verified User
Joined
Dec 5, 2010
Messages
89
I'm sure I'm going crazy, because I'm not normally this silly :unsure:

When modifying php's disable_functions, it's not taking affect. I've modified the php_disable_functions in the custombuild/custom/ folder, which populates the /usr/local/php83/lib/php.ini. Great, that bit is working perfectly!

However, looking at phpinfo, I can see that it's picking it up from somewhere else (have confirmed that other options in the php.ini are fine, such as disable_classes, but adding a test class)
Things I've tried:
- editing /usr/local/php83/lib/php.ini directly, even removing all functions but 1 to test.
- completely disabling secure_php and rebuilding the php_ini files.
- tried with php74 too - same thing.

phpinfo just keeps showing:
1744101408901.png


there are no additional ini's set
1744101483529.png


Please show me where I'm forgetting something!
 
Hello,

So you tried to disable disable_functions (i.e. empty the list of disabled functions) in /usr/local/php83/lib/php.ini and checked phpinfo() output for PHP 8.3 in a browser? Correct? And is the script with phpinfo() located under /home/ or /var/www/html/ ?

Any other ideas?
 
Correct, tried to disable it in php.ini, no luck. Checked in /home/ and in /var/www/html/. No change. Other things would change (such as disable_classes.
Tried modifying it in Custom HTTPD Configurations from DA UI using "php_admin_value[disable_functions] = etc", it doesn't override it. So I manually edited /usr/local/directadmin/data/users/USERNAME/php/php-fpm83.conf to what I wanted, and it worked! Until the .conf was overridden by DA.

Thanks for trying to help! Any other ideas?
 
Do you have php_admin_value[disable_functions] in a template for php-fpmXX.conf ?

Once disable_functions is specified in php.ini it can not be overwritten neither in php-fpmXX.conf nor in .user.ini.

/usr/local/directadmin/data/users/USERNAME/php/php-fpm83.conf
 
Back
Top