• Sorry to start another thread over the same issue, but my system is now logging the following error over 4,000 per day:

    [05-Jul-2023 22:17:04 UTC] PHP Warning: Cannot modify header information - headers already sent in /home/mesmer17/public_html/wp-content/plugins/gridlist-view-for-woocommerce/includes/functions.php on line 27

    I temporarily deleted the security headers from my htaccess file to see if they were causing this conflict. They were not.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    Line 27 of functions.php is

    setcookie ( ‘br_lgv_stat’, $cookie_lgv, 0, ‘/’, $domain );

    According to php.net
    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.”

    As you can see this line is not there for sending headers. Most likely headers are sent because this line has an error on your site/server.

    Please check for an error before the “PHP Warning: Cannot modify header information“. It can be right before it or in another error log eg with fatal/critical errors.

    Regards,
    Dmytro

    Thread Starter mesmer7

    (@mesmer7)

    @dholovnia,

    There are no other errors in my log, just thousands of copies of this error. It’s even logged when I access pages where the script has previously been unloaded by Asset Cleanup.

    I need you to tell me what could be causing the conflict. Could Asset Cleanup or Litespeed Cache be causing the conflict? Could be caused by moving all javascripts to the footers?

    • This reply was modified 1 year, 4 months ago by mesmer7.
    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    This is PHP code. Moving assets will not help.

    Btw what version of the plugin do you have?
    What code do you have on line 27 of ‘gridlist-view-for-woocommerce/includes/functions.php’ file?

    Regards,
    Dmytro

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP error, still not resolved’ is closed to new replies.