Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    That message means that the error_log configuration directive is missing or set to an empty value.

    Try following the instructions displayed below the message. Specifically, create an empty log file somewhere, make sure its writable by PHP, and add these two lines to your wp-config.php:

    ini_set('log_errors', 'On');
    ini_set('error_log', '/full/path/to/php-errors.log');

    (Replace “/full/path/to/php-errors.log” with the actual log file path.)

    Thread Starter mudguts

    (@mudguts)

    Thanks, Janis, but telling us to add ‘/full/path/to/php-errors.log’ or ‘/home/path/logs/php-errors.log’ is confusing for the nonprofessional. Better would be to give a concrete example.
    If I right-click on the empty file I’ve created called ‘php-errors.log’ (writable (664) and in any directory) using my FTP client and choose, for example, ‘Copy Path’, I get ‘ftp://’ at the beginning. That looks odd and sure enough if I include it, I get, for example, ‘The log file ftp://mydomain.de//logs/php-errors.log does not exist or is inaccessible. If I add ‘home’ to the beginning: ‘ftp://home/mydomain.de//logs/php-errors.log’, I actually do get an error message which starts: Warning: is_readable(): php_network_getaddresses: getaddrinfo failed:. But below the message it still says that the file doesn’t exist or is inaccessible. If I get rid of ‘ftp://’ or replace it with ‘full’, it tells me the same thing. But when I put ‘home’ in front: ‘/home/mydomain.de//logs/php-error.log’, it says that the error log filename is not set, plus the usual instructions.

    I would like to have error logs on my testing site because I’m having compatibility problems with a plugin that is essential and it would be helpful for the developers of the plugin if they could see an error log output.

    Do you have any suggestions? What other information would you need from me?

    Plugin Author Janis Elsts

    (@whiteshadow)

    You need the absolute path to the log file. The path will depend on the OS, server configuration and the hosting provider, so I can’t tell you the exact value to use.

    Still, the path definitely shouldn’t contain a “ftp://” or any other protocol prefix.

    Maybe you could ask your host for the full path to your home directory or web root? Then you could set the log file path based on that.

    Thread Starter mudguts

    (@mudguts)

    I’ve made another attempt and now what I get in the PHP Error Log box in the Dashboard is simply: The log file is empty. – nothing more. Could that now be correct? If so, I’m much obliged to you.

    Plugin Author Janis Elsts

    (@whiteshadow)

    Yes, that could be correct. If you want to make sure it works, try adding some lines to the file and see if they show up in the widget.

    Thread Starter mudguts

    (@mudguts)

    Yes, I did and it works ??
    I found the absolute path by looking closer at the error message I received previously when I included a protocol prefix in the path (ftp://home/). It turned out to be a Plesk platform, so:
    /var/www/vhosts/domain.com/etc/php-errors.log does the trick.
    Thanks again, now to start further experimenting with the help of the widget.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error log filename is not set’ is closed to new replies.