Title: When setting error.log path
Last modified: August 22, 2016

---

# When setting error.log path

 *  Resolved [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/)
 * “PHP uses files named as /var/userdata/web/***.com/website/www/ecc3814dbeaaa3bcc2fd0cf11dfb4b92/
   error.log to log errors found in the code”
 * “There are no error log files in your project.”
 * Please detect ONE log file when it is set to an absolute path.
 * [https://wordpress.org/plugins/sucuri-scanner/](https://wordpress.org/plugins/sucuri-scanner/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882749)
 * Fixed with changeset 1110538 [1]. You can download the development version [2]
   of the plugin if you want to test the new changes. Thanks for the suggestion.
 * [1] [https://plugins.trac.wordpress.org/changeset/1110538](https://plugins.trac.wordpress.org/changeset/1110538)
   [
   2] [https://downloads.wordpress.org/plugin/sucuri-scanner.zip](https://downloads.wordpress.org/plugin/sucuri-scanner.zip)
 *  Thread Starter [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882766)
 * Could you help?
 * Hardening / Error logs
 * /home/httpd/www/*.hu/html/*.hu/eskuvoi/c970859fd65e25ca148ab50f36951f46/error.
   log
 * There are 1 error log files in your project.
 * —
 * Site Info / Error Logs
 * No logs so far.
 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882770)
 * I did not understand your original message then, I thought that you were asking
   for a patch to simplify the file path of the error logs in the description of
   that panel, right now it should look like this: _“…named as error.log to log 
   errors…”_.
 * Can you explain the purpose of your suggestion? I believe that you want to see
   only the file names starting from the document root, which according to your 
   example should be _“/error.log”_ instead of the _“/home/…/error.log”_ is that
   correct? Can you tell me why do you want to change that? I do not understand 
   the purpose of that modification.
 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882771)
 * Anyway, here you have the patch… Fixed with changeset 1111120 [1]. You can download
   the development version [2] of the plugin if you want to test the new changes.
   Thanks for the suggestion.
 * [1] [https://plugins.trac.wordpress.org/changeset/1111120](https://plugins.trac.wordpress.org/changeset/1111120)
   [
   2] [https://downloads.wordpress.org/plugin/sucuri-scanner.zip](https://downloads.wordpress.org/plugin/sucuri-scanner.zip)
 *  Thread Starter [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882788)
 * I’d like to make it clear. There are two very different cases.
 * 1.
 * `error_log` is unset or set to a realtive path: PHP tries to write into that 
   file, and it’s location is chaging based on the currently called script file.
 * 2
 * `error_log` is set to an absolute path – begins with a slash: PHP will always
   try to log to one file.
 * I think in case 1 you should search for the log files `basename($error_log)`,
   but in case 2 you should only parse one file.
 *  [yorman](https://wordpress.org/support/users/yorman/)
 * (@yorman)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882789)
 * Okay I understand now, I was confused because you were referring to the _“Error
   Logs”_ section from the _“Hardening”_ page, the code works correctly there, the
   plugin searches all the error log files in the project and list them in that 
   section like this [1].
 * What you described in your last comment is nothing that affects the functionality
   of that section, but the panel named _“Error Logs”_ located in the _“Site Info”_
   page, which is where the plugin reads the content of the main log file generally
   located in the document root of the site.
 * According to your explanation I should detect where the error log files are and
   read them according to the location, but that was not the intention of the error
   log reader. I implemented that tool to allow web developers to find errors generated
   by the website in development mode. This error log reader is not a tool related
   with security, but the error log finder is, that is why those two tools are in
   different sections of the plugin.
 * For instance, if you have an error log file in the root of the project the hardening
   page will find that file and any other file in the sub-folders. But if there 
   is an error log file in the _“wp-admin”_ for example, and not in the root of 
   the project the plugin will find those files but not read them in the site info
   page.
 * I hope this clarifies the reasons that I have to not complement the action field
   of the error log reader. My co-workers suggested to remove that tool since it
   is not security related, so I think this is better than nothing.
 * [1] [https://s3.amazonaws.com/uploads.hipchat.com/19080/374190/gXllhCS3NY27zyl/wp-error-logs.png](https://s3.amazonaws.com/uploads.hipchat.com/19080/374190/gXllhCS3NY27zyl/wp-error-logs.png)
 *  Thread Starter [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882790)
 * Listing stray error_log files is a nice feature.
 * I’d like to see my absolute-path error log’s last 30 lines. That would be a nicer
   feature in “Site Info”. Now that list is empty but my error log is huge.
 *  Thread Starter [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882791)
 * off: This is my error log generating security plugin.
    [https://github.com/szepeviktor/wordpress-plugin-construction/tree/master/wordpress-fail2ban](https://github.com/szepeviktor/wordpress-plugin-construction/tree/master/wordpress-fail2ban)
 * Basically it is a fail2ban trigger but can be used in standalone mode.
    I think
   this piece of code is the strictest security plugin. Even stricter than Sucuri.
 *  Thread Starter [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882792)
 * I haven’t seen any code similar to this.
 * Are you interested in incorporating my code in Sucuri?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘When setting error.log path’ is closed to new replies.

 * ![](https://ps.w.org/sucuri-scanner/assets/icon-256x256.png?rev=2875755)
 * [Sucuri Security - Auditing, Malware Scanner and Security Hardening](https://wordpress.org/plugins/sucuri-scanner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sucuri-scanner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sucuri-scanner/)
 * [Active Topics](https://wordpress.org/support/plugin/sucuri-scanner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sucuri-scanner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sucuri-scanner/reviews/)

## Tags

 * [errorlog](https://wordpress.org/support/topic-tag/errorlog/)

 * 9 replies
 * 2 participants
 * Last reply from: [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/when-setting-errorlog-path/#post-5882792)
 * Status: resolved