[BlueOnyx:24674] Re: php-fpm logging

Michael Stauber mstauber at blueonyx.it
Sun Dec 20 22:39:30 -05 2020


Hi Ernie,

> How can I give a web developer access to the php-fpm error log so he
> can fix some warnings on a vsite?
> 
> I can see the PHP errors in /var/log/httpd/error_log but the web developer
> doesn't have access to that.

I wouldn't give him access to the logs, as that would be too revealing.

Our PHP usually has "display_errors = Off" set. So errors are only
logged, but not displayed in the browser.

The easy way around this on a per Vsite basis is to check the php.d
directory of the Vsite.

Example on a 5210R: /home/.sites/site2/wwwroot/php.d/

Example on a 5209R: /home/.sites/site2/php.d/

Inside that directory create a file named "errors.ini" with this text in it:

php_flag[display_errors] = Off

Then go to the GUI of that Vsite, go to the PHP settings of that Vsite
and make a small change. That will write out new PHP settings and will
also take the *.ini files in php.d into account.

Afterwards your user should be able to see PHP errors in the browser
right when they happen.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list