[wp-hackers] wp_redirect() fails on Linux

AJ Chen canovaj at gmail.com
Wed Aug 23 05:39:55 GMT 2006


My plugin uses wp_redirect() to start new post editor for specific type of
post:
   wp_redirect("http://web2express.org/openlab/wp-admin/post.php?w2x=prj");

It works on windows xp, but fails on Linux server. 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*

Line 272 is header() function. It should redirect to
   http://web2express.org/openlab/wp-admin/post.php?w2x=prj"

but, header () fails, and the browser is redirected to
http://web2express.org/openlab/wp-admin/post.php?page=prj.

There must be something printed before header() is called when wordpress is
running on Linux.  Has anybody seen this before?  Any idea what might be
printed before line 272 header() is executed?  It could be a bug.

Thanks,
AJ


More information about the wp-hackers mailing list