overwrite settings made in default php-fpm56.conf

RoRoo

Verified User
Joined
Dec 16, 2004
Messages
117
I've got php-fpm installed using custombuild 2.0

Every user gets it's own php-fpm56.conf file that it uses.
But for a certain user I want to overwrite a setting:

php_admin_value[display_errors] = off <--- Generic for all users in the /usr/local/directadmin/data/templates/custom/php-fpm.conf

When I change this using CMD_CUSTOM_HTTPD?user=username&php-fpm=5.6 and enter

php_admin_value[display_errors] = On

in the [CUSTOM2] (Or CUSTOM1 either way) field, click save and restart php-fpm56
the setting won't be applied.

Am I doing things incorrectly?
 
Hello,

The template /usr/local/directadmin/data/templates/custom/php-fpm.conf on my server does not have the line:

Code:
[/COLOR][COLOR=#333333]php_admin_value[display_errors] = off

Did you add it yourself?

How do you check that the value did not changed? To get clear results you might need to create a test.php with

PHP:
<?php
phpinfo();

and see whether or not the value of the options changes. If you try to see results of changed options in a browser when viewing a site made on a CMS, then the CMS might overwrite the directive and that's why you might think that the settings won't be applied.
 
Hello,

The template /usr/local/directadmin/data/templates/custom/php-fpm.conf on my server does not have the line:

Code:
[/COLOR][COLOR=#333333]php_admin_value[display_errors] = off

Did you add it yourself?

How do you check that the value did not changed? To get clear results you might need to create a test.php with

PHP:
<?php
phpinfo();

and see whether or not the value of the options changes. If you try to see results of changed options in a browser when viewing a site made on a CMS, then the CMS might overwrite the directive and that's why you might think that the settings won't be applied.
Like I said:
I've added the value for all users in:
php_admin_value[display_errors] = off <--- Generic for all users in the /usr/local/directadmin/data/templates/custom/php-fpm.conf

And tested it with phpinfo, the setting gets switched off.

But when I want to switch it on for 1 specific user using the DA specified tools it won't get applied.

I've tested it by inserting it before the file with the [CUSTOM1] field and after all the rules with [CUSTOM2] field, but the setting remains off.

There's not .htaccess or other files that are changing these settings.
 
If does not work the way you do try to do it completely another way. To be honest I'm not sure why you do that, when the option is OFF by default in php.ini:

Code:
# php -i | grep display_errors
display_errors => Off => Off

OK, it seems it works only if to specify the directive only once, i.e. the first placed directive is only honored. So if for any reason you don't set OFF in php.ini you might consider using a custom token for this, related: http://help.directadmin.com/item.php?id=2
 
Back
Top