Forums

How do I solve the Headers already sent warning problem? (4 posts)

  1. rose.jim@verizon.net
    Member
    Posted 4 months ago #

    I've read many of the postings on this problem.
    I feel that my problem isn't covered.

    The plug-in "Simple Login Log" is successful in setting the headers properly and sending a .csv file to the user. No error messages.

    The code which this plugin uses is:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    Copying that code into a new plug-in (fjanth) produces the error message:
    "[09-Jan-2012 22:24:45] PHP Warning: Cannot modify header information - headers already sent by (output started at /home5/fjarchiv/public_html/wp-admin/includes/template.php:1657) in /home5/fjarchiv/public_html/wp-content/plugins/fjanth/fjanth.php on line 112"

    The code I'm using is:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    The issue for me is why does one plugin work and the other not?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

  3. rose.jim@verizon.net
    Member
    Posted 4 months ago #

    I have read the posts. Again, forcing a download works for the plugin "Simple Login Log" (which sends a .csv file to the user). But it does not work in the following (short) plugin.

    [Code moderated as per the Forum Rules. Please use the pastebin]

  4. rose.jim@verizon.net
    Member
    Posted 4 months ago #

    The sample code for this plugin (56 lines) can be found at: http://pastebin.com/jg9KzQxk

Reply

You must log in to post.

About this Topic