• Resolved laksy001

    (@laksy001)


    Hello guys,

    I am having a problem that’s irritating me for days.

    First of all I am using the latest WordPress (2.6.3)

    The problem is that on my admin panel , either on the footer or on some boxes I see this kind of PHP Errors:

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(error_log) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/axxxxxx/public_html/wp-includes/wp-db.php on line 500

    PHP Error Message

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(error_log) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/axxxxxx/public_html/wp-includes/wp-db.php on line 500

    I ‘ve chmodded the whole wp-includes directory – including subfolders and files – to 777 but still no solution.

    The 500 line on wp-db.php is the following:

    499: $log_file = @ini_get(‘error_log’)
    500: if ( !empty($log_file) && (‘syslog’ != $log_file) && !is_writable($log_file) )
    501: $log_error = false;

    Any help is really appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Set the error_log option to some file in your home folder.
    Something like:

    @ini_set('error_log', '/home/axxxx/error_log');

    in index.php

    Thread Starter laksy001

    (@laksy001)

    Thanks my friend but the problem still exists, I guess my host has an error_log directory that cannot be accesed .

    I managed to remove those three lines and the problem has gone;

    But is that safe?

    This code is related to database error logging, but such errors should not be raised when application works properly. Anyway, error logging will not work because error_log is outside of your home folder.

    Another option is to add error shield operator before is_writable as follows:

    if ( !empty($log_file) && ('syslog' != $log_file) && !@is_writable($log_file) )

    This also should eliminate warning.

    Thread Starter laksy001

    (@laksy001)

    Thanks my friend.

    Case Closed

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Errors: [function.is-writable] – Help!’ is closed to new replies.