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
Started 16 years ago by jonathanryan | 4 posts |
-
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 # -
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 # -
Cool - I'll give that a go. I thought I'd ask before hacking the config file....
Posted 16 years ago # -
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 #
Reply
You must log in to post.