• I tried to use your plugin without success.

    I add in wp-config.php :

    define('WP_DEBUG_LOG', true); //ini_set('log_errors', 1) + ini_set('error_log', WP_CONTENT_DIR . '/debug.log');

    And I show the var $logFile, I got this :

    string(43) "/var/www/example.com/log/error.log"

    And these warnings :

    Warning: is_readable(): open_basedir restriction in effect. File(/var/www/example.com/log/error.log) is not within the allowed path(s): (/htdocs:/var/www/example.com/htdocs:/var/www/cyprusautodealer.com/tmp:/var/www/example.com/exec_dir:/var/www/example.com/php-session:/var/lib/lws/:/usr/base/var/lib/lws:/htdocs:/tmp:/exec_dir:/php-session:/usr/share/php:/etc/pki/tls/certs:/etc/ssl/certs) in /htdocs/wp-content/plugins/error-log-monitor/Elm/PhpErrorLog.php on line 40
    
    Warning: file_exists(): open_basedir restriction in effect. File(/var/www/cyprusautodealer.com/log/error.log) is not within the allowed path(s): (/htdocs:/var/www/example.com/htdocs:/var/www/example.com/tmp:/var/www/example.com/exec_dir:/var/www/example.com/php-session:/var/lib/lws/:/usr/base/var/lib/lws:/htdocs:/tmp:/exec_dir:/php-session:/usr/share/php:/etc/pki/tls/certs:/etc/ssl/certs) in /htdocs/wp-content/plugins/error-log-monitor/Elm/PhpErrorLog.php on line 41
    
    The log file /var/www/example.com/log/error.log does not exist or is inaccessible.

    Even if I manualy make a file(755) \htdocs\log\error.log, that does not work.

    Have you got an idea to fix this ? Miss I something else ?

    • This topic was modified 6 years, 11 months ago by johan59.
    • This topic was modified 6 years, 11 months ago by johan59.
Viewing 1 replies (of 1 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    The error messages seem to suggest that the log file is in a directory that PHP cannot access due to security restrictions. However, putting it in htdocs should work, at least in theory. I’m not sure why it doesn’t.

    Could you try putting the log in the wp-content directory? The plugin should definitely be able to open it then. It leaves the file publicly accessible which isn’t great, but you could probably block it with .htaccess.

    Also, if you’re using symlinks for these directories, try using the symlinked path if the regular one doesn’t work.

Viewing 1 replies (of 1 total)
  • The topic ‘The log file /var/www/example.com/log/error.log does not exist or is inaccessib’ is closed to new replies.