Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Plugin issue WordPress

  • SOLVED

Hello,

Since today I'm having this problem. Everytime I try activate or deactivate the plugins I receive this error (tried to reinstall WP last version too)

Warning: Cannot modify header information - headers already sent by (output started at /home/tomvalmo/public_html/wp-includes/general-template.php:2101) in /home/tomvalmo/public_html/wp-includes/pluggable.php on line 866

Answers (2)

2012-01-25

Julio Potier answers:

Hello

For every plugin or a specific one ?

thank you


Julio Potier comments:

I think a plugin do something wrong, rename your "<em>plugins</em>" folder in "<em>plugins.old</em>" and reload your dashboard.
All plugins will be deactivated.
Then, activate them one by one to discover the bad one...

See you soon


baguapalm comments:

Julio,

Français peut-ĂȘtre ? Je le suis :-)

I receive this message now: I can't login anymore to the dashboard

W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home/tomvalmo/public_html/wp-content/advanced-cache.php.

Tks


Julio Potier comments:

Yes i'm french ;)

rename the file "advanced-cache.php" in "advanced-cache.php.old" too.

ps : i prefer talk in english because the community can follow us on the solution ;)


baguapalm comments:

If I try do delete the file I have a new error message: same one but with db.php file.


baguapalm comments:

new error: W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home/tomvalmo/public_html/wp-content/db.php.


Julio Potier comments:

Continue to rename this files, no worry, once the errors have gone, we will renamed them back.


baguapalm comments:

OK managed to get in:

but now all plugins are in red:

The plugin adminer/adminer.php has been deactivated due to an error: Plugin file does not exist.

The plugin akismet/akismet.php has been deactivated due to an error: Plugin file does not exist.

The plugin backupwordpress/plugin.php has been deactivated due to an error: Plugin file does not exist.


Julio Potier comments:

Ok, good, now you do not have any activated plugins.
Now :
1) rename back your "plugins.old" folder in "plugins"
2) refresh this plugin.php page in admin
3) activate the plugins one by one
4) if you got an error, you'll know which plugin is the bad boy.

See you :)


baguapalm comments:

The issue is more complex then it seems. I did delete the one I supposed was involved as it generated an error. I did delete the plugin by FTP (FAQ plugin). But I came across another error after again:

Warning: Cannot modify header information - headers already sent by (output started at /home/tomvalmo/public_html/wp-includes/general-template.php:2101) in /home/tomvalmo/public_html/wp-includes/pluggable.php on line 866


Julio Potier comments:

Ok so now, you got 0 active plugins ?
Did you change your theme recently ?


Julio Potier comments:

Or maybe a modification in your functions.php file, remove top and bottom chars before and after <?php and ?>
This cause the header problem.


Julio Potier comments:

haha, John just said it, sorry.
This was i thought to when i asked for the theme.


baguapalm comments:

Julio,

I did the same procedure (.old for plugin & so on) & it seems that the plugins are "stable" now. The only one I didn't activate is W3 total cache. But I can't delete the plugin from the admin. When I click nothing happens. Shall I delete it by FTP?

By the way thanks to John but I did try that already.


Julio Potier comments:

Yes delete is and delete all related files (advanced stuff and db.php stuff, also, wp-content/cache/ if only this plkugin is using it, i think yes)


baguapalm comments:

Julio,

ALL plugins work now (including W3 total cache) & the website is back again. Strange no?

thanks for your help.

I might hire you for some Wordpress coding if you are interested. May I contact you on your personal webpage?

All the best,

Mo


Julio Potier comments:

ok good, come on skype : julio.boiteaweb or gtalk/mail : [email protected]
<em>ps : if you want to thank John, do not forget to raise price ;)</em>


Julio Potier comments:

And do not forget to vote [[LINK href="http://wpquestions.com/question/pickAWinner/id/3788"]]http://wpquestions.com/question/pickAWinner/id/3788[[/LINK]]


baguapalm comments:

Sorry for John..

I'm using the system for the first time. Did send the price to Julio.

Best,

Mo

2012-01-25

John Cotton answers:

<blockquote>Warning: Cannot modify header information - headers already sent by (output started at /home/tomvalmo/public_html/wp-includes/general-template.php:2101) in /home/tomvalmo/public_html/wp-includes/pluggable.php on line 866</blockquote>

You often get this problem if you put spaces/whitespace after the end of what should just be a code file.

So, for example, at the end of functions.php if you have:
// PHP code
?>
CRLF
CRLF


That will cause the warning above (CRLF is, of course, so you can see I mean carriage return!).

The best way to solve this is NOT to close the PHP in all code files - ie remove the last
?>

The reason this happens is that the carriage returns get treated as part of the HTML output and so get written to the response stream - ie starting to write the headers. However, functions.php (and lots of other files) get processed before some header work is done - hence the problem.

So, the answer is ALWAYS from the last ?> from any "code only" file!


baguapalm comments:

Hey John,

John I can send you an extra with Paypal. How can we do it through wpquestions?

Tks