-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WordPress theme - headers already sent #15
Comments
This is not a bug in my extension. You cannot send headers after output has started. You can use You can also use output buffering to delay output so you can still set headers. |
I think it would be great if there could be some clear instructions on how to use this with wordpress |
Use the WP Chrome Logger WordPress plugin. It solves the mentioned problems. |
You can also use the plugin Debug Objects in WordPress. This use Chrome Logger and have also another debugging features. |
I have been using this on multiple WordPress projects with no issues. There is no issue related to the debugger and WordPress. It's all a matter of how you are using the debugger and logging your information. |
If you try to debug a statement at a point where the HTML output has already begun you will get the error mentioned. If output buffering is enabled you will not have a problem. "There is no issue related to the debugger and WordPress." I don't think it's a WordPress issue per se, but a generic PHP issue. As soon as the first HTML has been sent to the client you cannot add more debug statements. WordPress just makes it very easy to do this as you generally write plugins / themes which hook into the main site. I wonder what setup you are using that you never had any issues? Do you use ob_start() / ob_flush() ? Some setting in Apache? The very first debug statement I wrote gave me this error right away... Could be a coincidence... |
@StijnDeWitt WP Chrome Logger didn't solve the problems for me |
Using chromePHP inside a WordPress theme gives me an error of "headers already sent". The problematic line is 385:
header(self::HEADER_NAME . ': ' . $this->_encode($data));
Using ChromePHP in WP is no problem as long as wp_head() isn't called.
Is there a known workaround?
The text was updated successfully, but these errors were encountered: