This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Error: Cannot modify header information


  1. jonathanryan
    Member

    I've just plugged a form into a Wordpress page using the "advanced" installation. The iFrame version works fine but I hate iFrames....

    I get the following error

    Warning: Cannot modify header information - headers already sent by (output started at [webroot]/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php:158) in [webroot]/machform/config.php on line 51

    (The [webroot] bit is actually the full path to my code - I edited the message for display here). Then the form loads properly. It's a warning rather than an error but looks a bit messy.

    I took a look at the error line in config.php and it looks like it's just setting the page to UTF-8. Is there a good reason for this? Can I just remove it from config on the grounds that all my pages will include it or will it choke when I try to test forms standalone?

    Posted 16 years ago #
  2. yuniar

    Hmm... you are right. It shouldn't send any header when using advanced code.

    Don't remove the header line in your config.php file. Instead, add a '@' character in front of it. So it become like this:

    @header("Content-Type: text/html; charset=UTF-8");


    MachForm Founder

    Posted 16 years ago #
  3. jonathanryan
    Member

    Cool - I'll give that a go. I thought I'd ask before hacking the config file....

    Posted 16 years ago #
  4. walags
    Member

    that fixed the problem for me. i like how i am the new kid on the block and can search and find the answer to everything!

    Posted 16 years ago #

RSS feed for this topic

Reply