I'm getting an error on my site regarding "headers already sent":
Warning: Cannot modify header information - headers already sent by (output started at ........./wp-admin/menu-header.php:161) in ....../wp-includes/pluggable.php on line 881
I read the Wordpress FAQ that discusses this, but - as you can see - this error is caused by the Wordpress core (and not even at the end of a file).
Interestingly, I don't get this error on my local machine. Only on my server.
What can I do about this?
I'm running Wordpress 3.4.2
admin_menu
action hook, and then do awp_redirect
from within that page (wp_redirect
is defined inpluggable.php
). Is there a different (earlier) hook I should be using instead?wp_redirect
? Quoted from the codex "wp_redirect() does not exit automatically and should almost always be followed by exit. "exit
. Since the error originates inpluggable.php
, it's clearly caused by thewp_redirect
. It's a pity though that I don't get a stack trace.<?php
is enough to create an error