WP Error - Help? :)

Sh@rk

Member
Nov 20, 2011
168
0
16
Warning: Cannot modify header information - headers already sent by (output started at /home/XXXXXX/public_html/www.johnsmith.com/index.php:3) in /home/XXXXXX/public_html/www.johnsmith.com/wp-includes/pluggable.php on line 881
 


Should also mention, error only happens when the site is linked from Facebook on http://www.

domain.com works fine from Facebook, strange.
 
don't really understand your second post. In any case, post the relevant snippets of code and it should be easy to fix.
 
Its when the site is linked from Facebook using www., when just using domain.com it is fine, doesn't seem to like the www

Ian Jamieson Parse error: syntax error, unexpected $end in /home/briancox/public_html/www.troonvan.com/wp-includes/pluggable.php on line 1724
6 minutes ago · Like

Ian Jamieson on google chrome
5 minutes ago · Like

Brian Hale Working on it
5 minutes ago · Like

Ian Jamieson Fatal error: Call to undefined function wp_redirect() in /home/briancox/public_html/www.troonvan.com/wp-includes/canonical.php on line 428
5 minutes ago · Like

Ian Jamieson no bother man!
5 minutes ago · Like

Ian Jamieson i'd offer help but i know shit all aha
4 minutes ago · Like

Brian Hale lol just blanking now
about a minute ago · Like

Ian Jamieson ‎Gordon Martin help
about a minute ago · Like

Brian Hale Removals Ayrshire - Troon Van - Courier Ayrshire - Collections Ayrshire
a few seconds ago · Like

Brian Hale Doesn't like the www
a few seconds ago · Like

Ian Jamieson thats it!
a few seconds ago · Like

Brian Hale http://www.troonvan.com/
 
It's got to be an incompatible plugin. Disable all and then enable one at a time to see which one is causing that error message.

OR.

Check your functions.php file to make sure there isn't a blank space on line 1. I've seen that cause this before too. But I'm putting money on plugin's not playing nice with each other.
 
headers already sent error is caused by, well, trying to send header multiple times.

In a web response, there's a set of headers and the body response. You can't send a header response after you've started sending the body, and you can't send more headers after sending the initial ones.

My guess is whatever the fuck wp_pluggable is, is trying to redirect with a header() call (that's how you do a 301 redirect in php) after it's already been done somewhere else or something.

Start disabling plugins until the error goes away.
 
headers already sent error is caused by, well, trying to send header multiple times.

In a web response, there's a set of headers and the body response. You can't send a header response after you've started sending the body, and you can't send more headers after sending the initial ones.

My guess is whatever the fuck wp_pluggable is, is trying to redirect with a header() call (that's how you do a 301 redirect in php) after it's already been done somewhere else or something.

Start disabling plugins until the error goes away.

Ding, ding, ding. It is a common error you see in PHP when you start outputting a part of the body and try and change the header.
 
Thanks for the input, tried disabling all plugins but again the same thing, the site won't load either way using www.

Loads fine when just domain.com, I removed line 881 (see my orgional post) and it just loads a blank screen
 
Thanks for the input, tried disabling all plugins but again the same thing, the site won't load either way using www.

Loads fine when just domain.com, I removed line 881 (see my orgional post) and it just loads a blank screen

rereading your error you saw, go back and add that line at 881 back in. In wordpress, you never want to touch anything in wp-admin or wp-includes folder.

I'm thinking you somehow are handling the 301 redirect in your wordpress install/some other PHP rather than at the server level. That's probably what's causing the problem.

How did you set www to non-www redirect?
 
I think this is the error causing the problem:

Ian Jamieson Parse error: syntax error, unexpected $end in /home/briancox/public_html/www.troonvan.com/wp-includes/pluggable.php on line 1724

That says there is a syntax error and is fatal so probably is printing out to the screen and killing the redirect that happens after it. It is probably some kind of seo pluggin so it's only affected by the www. as it might be trying to redirect to non-www. or something of sorts.
 
I doubt it. go download a fresh version of wordpress, dig into it to find the pluggable.php file, and copy that to your site, overwriting your current one.

A plugin wouldn't cause that error above as that error is saying that some sort of loop, conditional, class, whatever is being improperly ended.

tl;dr your brackets or parentheses are probably fucked up in that file