Turn off PHP Warning for specific website

Discussion in 'Installation/Configuration' started by Poliman, Feb 12, 2018.

  1. Poliman

    Poliman Member

    I have a problem in /var/log/ispconfig/httpd/subdomain.domain.com:
    Code:
    [Mon Feb 12 15:25:24.206108 2018] [fcgid:warn] [pid 6352] [client X.X.X.X:  65412] mod_fcgid: stderr: PHP Warning:  preg_replace(): The /e modifier is no lo  nger supported, use preg_replace_callback instead in /var/www/clients/client11/web28/web/library/Zend/Filter/PregReplace.php on line 171, referer: https://subdomain.domain.com
    
    I would like to turn off PHP Warning for this specific website subdomain.domain.com.
     
  2. Ghostdare

    Ghostdare Member

    To remove the error messages, add these lines to site. SITES -> Web Site -> Options tab -> Custom php.ini
    display_errors = off
    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
     
  3. Poliman

    Poliman Member

    Is it for php errors, right? Does the PHP Warning means it is error or warning? I am newbie and I just want clear very huge log file which is full of lines like I put above. :)
     
  4. Ghostdare

    Ghostdare Member

  5. Poliman

    Poliman Member

    Yea but in log file each line has text "PHP Warning", so is that an error or warning? ;) I don't want to block errors, just these warnings "PHP Warning". Whole log file contains milions of these lines with this "PHP Warning" which I put in my 1st post.
     
  6. Ghostdare

    Ghostdare Member

    If it says it is a warning, it is a warning .... in your posted line it says :
    "PHP Warning: preg_replace(): The /e modifier is no longer supported"

    All those messages are good for web developers. Their code must be updated.
     
  7. Poliman

    Poliman Member

    Yes, I know, devs also know. But I need disable these warnings, because log file size is almost 7GB. ;)
     
  8. Ghostdare

    Ghostdare Member

  9. Poliman

    Poliman Member

    Thank you, I will check it and give response. Could you tell me all these parameters should be put SITES -> Web Site -> Options tab -> Custom php.ini ?
     
  10. Ghostdare

    Ghostdare Member

  11. Poliman

    Poliman Member

    This type of warning is quite strange. Function which gives warning is full supported bu php7. Developer moment ago told me that.

    PS
    One parameter of this function is deprecated.
    What kind of warning is this from my first post? I see on websites you put few types:
    - E_CORE_WARNING
    - E_COMPILE_WARNING
    - E_USER_WARNING
    - E_WARNING

    Do you know how check where these Custom PHP lines under ISP are added? If I would like to disable all errors should I setup error_reporting = 0 (based on http://php.net/manual/en/function.error-reporting.php)?
     
    Last edited: Feb 15, 2018 at 8:30 AM

Share This Page