I would like to disable each php notification in log for some aliasdomain (vhost). Currently I set under Options tab for particular site in input "Custom php.ini settings": Code: display_errors = off error_reporting = off Unfortunately it does not works. I tried few other combinations - with "0" instead of "off", with php_value... Nothing helped. I need to turn it off, because log file is very big and still growing: Code: root@s1:~# find / -type f -size +1000000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' /var/www/clients/client11/web28/log/societe/error.log: 1.1G There is a lot lines like below: Code: [Fri Mar 16 08:03:51.085569 2018] [fcgid:warn] [pid 21414] [client ip_address:62872] mod_fcgid: stderr: PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/clients/client11/web28/web/library/Zend/Filter/PregReplace.php on line 171, referer: https://alias.domain-vhost.pl/sebium_h2o-2018 Because site use php 7, but her code is quite old, designed for php 5.3 and Zend1.
The solution is to install php5.3 and assign it to that site rather than disabling php error reporting. Note that normally php5.6 works too so try its latest version (which is more secured) before trying php5.3.
@ahrasis Code of this app was written by really beginners and this is really mess. On php 5.6.30 I get these same logs. Current working devs try to fix this messy app but during this process I need to stop throwing this errors/warnings. Now this file is around 2GB. If not under ISP maybe in specific php file I could edit some values to disable ddos logging?
I will try but in which file add this line (after add some apache restart/reload)? Do you know which php.ini file is used by particular website when under its settings is Fast-CGI with default php (in my case php 7.0 which is default for Ubuntu 16.04 Server)? I am asking, because changes added to field "Custom php.ini settings" are added somewhere and work only for specific website.
You have right Till. But what if I would set Fast-CGI PHP7.0 for few websites but only for one from them I put in Options --> Custom php.ini settings some custom php lines? Would they be inside /etc/php/7.0/cgi/php.ini? I am thinking about case when I need block php errors for only one website. Of course few websites use php7.0 fast-cgi. @ahrasis I put error_reporting(0); and I will see tomorrow how it's going, because only devs can test part of application which generates errors.
No, off course not as this is the file for all sites. Custom php.ini files that get generated in case you use the custom php,ini field are in /var/www/conf/.... You can easily see the full path in the phpinfo() command output when you add a file with phpinfo() in this specific website.
Thank you Till. I will check this. Do you know maybe how could I disable php errors like I put in my first post? @ahrasis provide two options, maybe you also know something.
I added for one website options two lines: Code: upload_max_filesize = 124M post_max_filesize = 124M and of course under /var/www/conf/web78/php.ini I see these two lines (at the bottom of file) but also default ones which are set to respectively 2M and 8M. Why these are not altered? If I have in php.ini few same attributes with different values, these from bottom will be used?