Title: php errors with plugin
Last modified: December 28, 2020

---

# php errors with plugin

 *  Resolved [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * (@fotogaaf)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/)
 * Hi,
 * Like the plugin results, BUT:
 * keep getting error in phperror log:
 * Cannot start session when headers already sent in /data/home/fotogaaf/www.fotogaaf.
   nl/wp-content/plugins/contact-form-7-lead-info-with-country/wpshore_cf7_lead_tracking.
   php on line 30
 * How to fix please
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-errors-with-plugin%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13842602)
 * Hi [@fotogaaf](https://wordpress.org/support/users/fotogaaf/),
 * Which PHP version are you using?
 * We don’t see this error on our test sites. Plugin should work with PHP up to 
   7.4.x. With 8.0.x it has not been tested and it’s probably not working as there
   have been many changes we will be applying during next months to our plugins.
 * Best regards from Spain.
 *  Thread Starter [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * (@fotogaaf)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13843370)
 * PHP versie 7.4.13 (Ondersteunt 64bit waarden)
 * keep getting the error: pleas help
 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13851138)
 * Hi [@fotogaaf](https://wordpress.org/support/users/fotogaaf/),
 * We can’t reproduce the error so it must be caused either by your theme or another
   plugin. Could you please give us information about the used theme (name + version)
   and the installed plugins (name + version) so that we can try to find a solution.
 * One solution for you could be change line 29 of the file `wpshore_cf7_lead_tracking.
   php`:
    `if (!session_id()) {` to `if (!session_id() && !headers_sent()) {` and
   try if this solves the issue and the plugin does what it should.
 * We can’t test this solution as we can’t reproduce the “Cannot start session when
   headers already sent” error to see if this solutions still provides the data 
   that is expected.
 * Best regards from Spain.
 *  [razvan.stoica89](https://wordpress.org/support/users/razvanstoica89/)
 * (@razvanstoica89)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13860916)
 * Hi [@apasionados](https://wordpress.org/support/users/apasionados/),
 * I face the same problem as [@fotogaaf](https://wordpress.org/support/users/fotogaaf/)
   on two different sites.
    I managed to solve this problem by applying the solution
   proposed by you:
 * > Change line 29 of the file wpshore_cf7_lead_tracking.php from:
   >  `if (!session_id()){`
   > to `if (!session_id() && !headers_sent()) {`
 * Can you please apply this fix in the next version?
 * Best regards from Romania.
    -  This reply was modified 5 years, 4 months ago by [razvan.stoica89](https://wordpress.org/support/users/razvanstoica89/).
    -  This reply was modified 5 years, 4 months ago by [razvan.stoica89](https://wordpress.org/support/users/razvanstoica89/).
 *  Thread Starter [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * (@fotogaaf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13862952)
 * Hi [@apasionados](https://wordpress.org/support/users/apasionados/),
 * Same here:
 * One solution for you could be change line 29 of the file wpshore_cf7_lead_tracking.
   php:
    if (!session_id()) { to if (!session_id() && !headers_sent()) {
 * Did work:
 * Can you please apply this fix in the next version?
 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13863789)
 * Hi [@fotogaaf](https://wordpress.org/support/users/fotogaaf/) & [@razvanstoica89](https://wordpress.org/support/users/razvanstoica89/)
 * Great to hear that it worked for both of you.
 * We will update it during this week.
 * Best regards from Spain.
 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13878369)
 * Hi [@fotogaaf](https://wordpress.org/support/users/fotogaaf/) & [@razvanstoica89](https://wordpress.org/support/users/razvanstoica89/)
 * We just updated the plugin to version 2.4 with the patch for the error you were
   seeing.
 * Please let us know if it works for you.
 * Best regards from Spain.
 *  Thread Starter [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * (@fotogaaf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13878463)
 * Hi [@apasionados](https://wordpress.org/support/users/apasionados/),
 * just updated the plugin…..so far so good!
    Thanks for now!
 *  Thread Starter [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * (@fotogaaf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13881092)
 * Hi [@apasionados](https://wordpress.org/support/users/apasionados/),
 * To bad: new error:
 * PHP Warning: Use of undefined constant body – assumed ‘body’ (this will throw
   an Error in a future version of PHP) in /data/home/fotogaaf/www.fotogaaf.nl/wp-
   content/plugins/contact-form-7-lead-info-with-country/wpshore_cf7_lead_tracking.
   php on line 61
 * Please a solution
 *  Plugin Author [apasionados](https://wordpress.org/support/users/apasionados/)
 * (@apasionados)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13881573)
 * This was solved on previous version (2.3) and has appearead again. In 2.4.1 it
   will be solved again.
 * Best regards from Spain.
 *  Thread Starter [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * (@fotogaaf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13885538)
 * Hi [@apasionados](https://wordpress.org/support/users/apasionados/),
 * SORRY: don’t know what happened, but issue is indeed resolved
    MY BAD !

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

The topic ‘php errors with plugin’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7-lead-info-with-country/assets/icon-128x128.
   png?rev=1043884)
 * [Lead info with country for Contact Form 7](https://wordpress.org/plugins/contact-form-7-lead-info-with-country/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-lead-info-with-country/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-lead-info-with-country/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-lead-info-with-country/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-lead-info-with-country/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-lead-info-with-country/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [fotogaaf](https://wordpress.org/support/users/fotogaaf/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/php-errors-with-plugin/#post-13885538)
 * Status: resolved