Title: PHP error
Last modified: August 21, 2020

---

# PHP error

 *  Resolved [2fer](https://wordpress.org/support/users/dominolady/)
 * (@dominolady)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-error-408/)
 * Hello WebCource,
    Your captcha appears to work perfectly except that it is filling
   up my php error logs with this line: [21-Aug-2020 01:34:02 UTC] PHP Warning: 
   Cannot modify header information – headers already sent in /home/example/public_html/
   wp-content/plugins/wc-captcha/includes/class-cookie-session.php on line 49 and
   occasionally this line: [21-Aug-2020 01:11:31 UTC] PHP Warning: Cannot modify
   header information – headers already sent in /home/example/public_html/wp-content/
   plugins/wc-captcha/includes/class-cookie-session.php on line 46
 * Those lines relate to:
    Line 46: setcookie( ‘mc_session_ids[default]’, $this-
   >session_ids[‘default’], current_time( ‘timestamp’, true ) + apply_filters( ‘
   Wc_Captcha_time’, Wc_Captcha()->options[‘general’][‘time’] ), COOKIEPATH, COOKIE_DOMAIN,(
   isset( $_SERVER[‘HTTPS’] ) && $_SERVER[‘HTTPS’] !== ‘off’ ? true : false ), true);
   and Line 49: setcookie( ‘mc_session_ids[multi][‘ . $i . ‘]’, $this->session_ids[‘
   multi’][$i], current_time( ‘timestamp’, true ) + apply_filters( ‘Wc_Captcha_time’,
   Wc_Captcha()->options[‘general’][‘time’] ), COOKIEPATH, COOKIE_DOMAIN );
 * I truly appreciate all the work that goes into creating such a plugin and would
   be very happy to leave a glowing review except that I removed a different plugin
   to add yours for the same reason. Huge logfiles of “headers already sent” without
   being able to fix it. Please if it is possible, let me know how I can fix this.
   WP is v 5.5, PHP is v. 7.4
 * I believe in supporting responsive plugins!
    Thank you 2fer
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-408%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Md Rimu Chowdhury](https://wordpress.org/support/users/webcource/)
 * (@webcource)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-error-408/#post-13294211)
 * Thanks for contacting with me. I will review this error if really conflict I 
   will fix and update new version.
 *  [BugfreeSystems](https://wordpress.org/support/users/bugfreesystems/)
 * (@bugfreesystems)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/php-error-408/#post-13644671)
 * Hi,
 * I have the same problem on my site.
 * Greetings, TJ
    -  This reply was modified 5 years, 6 months ago by [BugfreeSystems](https://wordpress.org/support/users/bugfreesystems/).
 *  Plugin Author [Md Rimu Chowdhury](https://wordpress.org/support/users/webcource/)
 * (@webcource)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-error-408/#post-13689416)
 * I hope now you can use my plugin because I have fixed
 *  Thread Starter [2fer](https://wordpress.org/support/users/dominolady/)
 * (@dominolady)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-error-408/#post-13689464)
 * I had left it there because it worked for the login page. I have just been deleting
   the error logs. I will update and let you know, but I certainly appreciate your
   work.
 * More later!
    Thank you! 2fer
 *  Thread Starter [2fer](https://wordpress.org/support/users/dominolady/)
 * (@dominolady)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-error-408/#post-13762561)
 * I have not seen any update to the plugin, so nothing has changed and I still 
   see error logs that I need to delete. If you have updated the plugin, it is not
   showing up here at wordpress.org.
 * It used to work with ContactForm7, now it doesn’t work there either but that 
   is because they have changed to integrate the Google ReCaptcha and I would not
   inflict that on anyone.
 *  Thread Starter [2fer](https://wordpress.org/support/users/dominolady/)
 * (@dominolady)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-error-408/#post-13856338)
 * I have updated the status of this question to “unresolved” because I am still
   not seeing any resolution and if there has been a fix I would appreciate being
   able to fix it. Telling me it has been fixed without providing a way for users
   of the plugin to change it really has done nothing to fix it at all. I would 
   be happy to mark this problem as “resolved” but not yet. Nothing has changed.
   Your wordpress.org plugin page shows: `Last updated: 5 months ago` so if it has
   been updated, please make the update available.
 *  Plugin Author [Md Rimu Chowdhury](https://wordpress.org/support/users/webcource/)
 * (@webcource)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-error-408/#post-13913076)
 * sorry for late. I have updated please check
 *  Plugin Author [Md Rimu Chowdhury](https://wordpress.org/support/users/webcource/)
 * (@webcource)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-error-408/#post-13964108)
 * I have recent update hope fixed
 *  [BugfreeSystems](https://wordpress.org/support/users/bugfreesystems/)
 * (@bugfreesystems)
 * [5 years ago](https://wordpress.org/support/topic/php-error-408/#post-14345746)
 * Hi [@webcource](https://wordpress.org/support/users/webcource/),
    today I updated
   wc_captcha to version 1.2.1. The php error is still there. The cause is, that
   setcookie() defines a cookie to be sent along with the rest of the HTTP headers.
   Like other headers, cookies must be sent before any output from your script (
   this is a protocol restriction). This requires that you place calls to this function
   prior to any output, including <html> and <head> tags as well as any whitespace,
   see: [https://stackoverflow.com/questions/2658083/setcookie-cannot-modify-header-information-headers-already-sent](https://stackoverflow.com/questions/2658083/setcookie-cannot-modify-header-information-headers-already-sent)

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

The topic ‘PHP error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wc-captcha_e6e6e6.svg)
 * [WC Captcha](https://wordpress.org/plugins/wc-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-captcha/reviews/)

## Tags

 * [headers already sent](https://wordpress.org/support/topic-tag/headers-already-sent/)
 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 9 replies
 * 3 participants
 * Last reply from: [BugfreeSystems](https://wordpress.org/support/users/bugfreesystems/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/php-error-408/#post-14345746)
 * Status: resolved