wp-db.php should change its error log (3 posts)

  1. pixeline
    Posted 8 years ago #

    Wow_ took me a while to figure out where the error message was coming from:

    wp-db.php uses the error_log defined in the server's main php.ini !

    This is conflicting with our open_basedir policy, so i hardcoded the domain name log folder instead.

    I think this should definitely be fixed _ why not have a wordpress specific error log file, in txt format inside the wordpress installation config directory ?

  2. shackbase
    Posted 7 years ago #

    Hi Pixeline,

    I agree with you, could you please post your fix to make the error_log local to the wordpress path vs global eror_log.

    Very much appreciated,


  3. pixeline
    Posted 7 years ago #


    open wp-includes/wp-db.php

    line 500 :

    $log_file = @ini_get('error_log');

    replace it with your own path:

    $log_file = '/var/www/pixeline/logs';

    i think the solution would be to let wordpress have its own errors.log file inside the main wordpress folder, easily accessible via the admin or via ftp for the administrator.

Topic Closed

This topic has been closed to new replies.

About this Topic