Title: Fixing the &#8220;Cannot modify header information&#8221; PHP error
Last modified: June 10, 2020

---

# Fixing the “Cannot modify header information” PHP error

 *  [Zade](https://wordpress.org/support/users/nothin7/)
 * (@nothin7)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/fixing-the-cannot-modify-header-information-php-error/)
 * With every page load, the PHP error log shows:
 * `PHP Warning: Cannot modify header information - headers already sent in /wp-
   content/plugins/simplr-registration-form/lib/wp-session-manager/includes/class-
   wp-session.php on line 128`
 * To fix, change that line 128 from:
 * `setcookie( WP_SESSION_COOKIE, $this->session_id . '||' . $this->expires . '|
   |' . $this->exp_variant , $this->expires, COOKIEPATH, COOKIE_DOMAIN, $secure,
   $httponly );`
 * to:
 *     ```
       if ( ! headers_sent() ) {
       	setcookie( WP_SESSION_COOKIE, $this->session_id . '||' . $this->expires . '||' . $this->exp_variant , $this->expires, COOKIEPATH, COOKIE_DOMAIN, $secure, $httponly );
       }
       ```
   

The topic ‘Fixing the “Cannot modify header information” PHP error’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simplr-registration-form_be8c38.svg)
 * [Simplr Registration Form Plus+](https://wordpress.org/plugins/simplr-registration-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simplr-registration-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simplr-registration-form/)
 * [Active Topics](https://wordpress.org/support/plugin/simplr-registration-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simplr-registration-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simplr-registration-form/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Zade](https://wordpress.org/support/users/nothin7/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/fixing-the-cannot-modify-header-information-php-error/)
 * Status: not resolved