[wp-hackers] wp_redirect() fails on Linux

Austin Matzko if.website at gmail.com
Wed Aug 23 05:33:59 GMT 2006


On 8/23/06, AJ Chen <canovaj at gmail.com> wrote:
> My web2x plugin uses wp_redirect() to start post editor:
> wp_redirect("http://web2express.org/openlab/wp-admin/post.php?w2x=prj");
>
> It works in my windows xp development environment, but it fails on linux
> server with error message:
> *Warning*: Cannot modify header information - headers already sent by
> (output started at /home/ajchen/public_html/openlab/wp-admin/admin-
> header.php:16) in */home/ajchen/public_html/openlab/wp-includes/pluggable-
> functions.php* on line *272

wp_redirect works only in the HTTP header, so if you're no longer in
or before the header when calling wp_redirect, you'll get that kind of
error.


More information about the wp-hackers mailing list