Title: error_log file
Last modified: November 14, 2022

---

# error_log file

 *  Resolved [themefour wp](https://wordpress.org/support/users/masouddarvishi1992/)
 * (@masouddarvishi1992)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/)
 * Hello. This error fills up my entire WordPress error_log file. The error is from
   your plugin.
 * [14-Nov-2022 11:32:21 UTC] PHP Warning: Cannot modify header information – headers
   already sent in /home/public_html/wp-content/advanced-headers.php on line 31
 * line 29 to 31 advanced-headers.php
    header(“X-XSS-Protection: 0”); header(“Cross-
   Origin-Opener-Policy: same-origin-allow-popups”); header(“Cross-Origin-Resource-
   Policy: cross-origin”);

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

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16196619)
 * Hi [@masouddarvishi1992](https://wordpress.org/support/users/masouddarvishi1992/),
 * This doesn’t necessarily mean the error is in the plugin. The error occurs because
   some other code has sent headers already, even though we’ve only just arrived
   at the wp-config.php.
 * Possibly there’s an include from another plugin before the advanced-headers.
 * In your wp-config.php, please check if the advanced-headers.php file is included
   before anything else. If there’s a caching plugin active, ensure that any includes
   are after the advanced-headers.php file.
    -  This reply was modified 3 years, 6 months ago by [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/).
 *  [lemjack7](https://wordpress.org/support/users/lemjack7/)
 * (@lemjack7)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16199484)
 * I am having the same errors on multiple sites since the new updates.
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16200408)
 * Hi [@lemjack7](https://wordpress.org/support/users/lemjack7/) [@masouddarvishi1992](https://wordpress.org/support/users/masouddarvishi1992/),
 * I now realise these includes are beloning to our add-on. We’re not allowed to
   discuss these features on the forum, as these are not part of the free plugin,
   so can you contact us directly at support(at)really-simple-ssl.com about this?
 * Thanks,
 * Rogier
 *  Thread Starter [themefour wp](https://wordpress.org/support/users/masouddarvishi1992/)
 * (@masouddarvishi1992)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16200694)
 * [@rogierlankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * I found the problem. In the wp-config.php file, a code was added to call the 
   advanced-headers.php file again! I don’t know what plugin added this!
 * I removed it and the problem was fixed.
    -  This reply was modified 3 years, 6 months ago by [themefour wp](https://wordpress.org/support/users/masouddarvishi1992/).
 *  [lemjack7](https://wordpress.org/support/users/lemjack7/)
 * (@lemjack7)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16201059)
 * I have sent a copy of the files.
    Cheers Roger
 *  [Jarvia](https://wordpress.org/support/users/jarvia/)
 * (@jarvia)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16201731)
 * [@masouddarvishi1992](https://wordpress.org/support/users/masouddarvishi1992/)
   This fixed my problem too. Thank you very much.
 *  Thread Starter [themefour wp](https://wordpress.org/support/users/masouddarvishi1992/)
 * (@masouddarvishi1992)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16210037)
 * [@rogierlankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * I updated your plugin on my site today. added this piece in the wp-config.php
   file!! This part causes various errors!
 * if ( file_exists(ABSPATH . “wp-content/advanced-headers.php”) ) {
    require_once
   ABSPATH . “wp-content/advanced-headers.php”; }
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16210106)
 * Is this the ‘headers already sent’ warning?
 * This warning can occur on some configurations, we have a fix ready for this. 
   If you want you can email us for the beta release of this version. support(at)
   really-simple-ssl.com
 * It will be released early next week.
    -  This reply was modified 3 years, 6 months ago by [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/).
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16218475)
 * [@masouddarvishi1992](https://wordpress.org/support/users/masouddarvishi1992/)
   [@lemjack7](https://wordpress.org/support/users/lemjack7/) [@jarvia](https://wordpress.org/support/users/jarvia/)
 * The issue seems to be that on some systems, the server throws an error, or sends
   a header, before the it reaches the ‘advanced-headers.php’ file. As a result,
   our code throws an error ‘headers already sent’. This is because the unknown 
   error causes headers to get sent.
 * To catch this, the coming update will include a headers_sent() check.
 * Of course, this can’t fix the issue that seems to exist on these configurations:
   we have no control over that. But it is possible to find out which code is causing
   this, by adding the following line of code to the advanced-headers.php file:
 *     ```
       if ( headers_sent($filename, $linenum) ) {
       	error_log("headers already sent in $filename, on line $linenum");
       } else {
        //original headers code here
       }
       ```
   
 * The above log will add a log to the server log file, which could tell us where
   the issue originates. You can also send this info directly to support(at)really-
   simple-ssl.com
    -  This reply was modified 3 years, 6 months ago by [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/).
 *  Thread Starter [themefour wp](https://wordpress.org/support/users/masouddarvishi1992/)
 * (@masouddarvishi1992)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16222949)
 * [@rogierlankhorst](https://wordpress.org/support/users/rogierlankhorst/)
    I updated
   the plugin. I saw again that this piece of code has been added to the wp-config
   file by your plugin! Why do you do this???? [https://ibb.co/y59tP96](https://ibb.co/y59tP96)
 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16223213)
 * [@masouddarvishi1992](https://wordpress.org/support/users/masouddarvishi1992/)
   This code sends the security headers you have enabled in Really Simple SSL. If
   you disable these the include will disappear. By including it here, it will work
   with all known caching plugins, on both NGINX and Apache, also on hosts who don’t
   support .htaccess headers.
 * The issue is not the code itself, but a piece of code which comes before this
   code. Because that code results in a header send action, our code results in 
   a “headers already sent” warning.
 * If you send us a message at support(at)really-simple-ssl.com we can help you 
   debug this.

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

The topic ‘error_log file’ is closed to new replies.

 * ![](https://ps.w.org/really-simple-ssl/assets/icon-256x256.png?rev=2839720)
 * [Really Simple Security - Simple and Performant Security (formerly Really Simple SSL)](https://wordpress.org/plugins/really-simple-ssl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-ssl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-ssl/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-ssl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-ssl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-ssl/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/error_log-file-3/#post-16223213)
 * Status: resolved