Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
2.9k views
in Q2A Core by
edited by

 

My website worked perfectly.

But then I upgraded my vps with x-cache, mysql 5.5, and also

.htaccess cache time 

 

# 1 MONTHS
<FilesMatch "\.(jpg|jpeg|png|gif|swf|ico)$">
Header set Cache-Control "max-age=2419200, public"
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>
 
 
<FilesMatch "\.(css|js)$">
Header set Cache-Control "max-age=604800, public"
ExpiresDefault "access plus 1 week"
SetOutputFilter DEFLATE
</FilesMatch>
 
The website still works perfectly but when I log with admin account, and access admin panel I get this error
Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/qa-include/qa-theme-base.php:1) in /home/xxxx/public_html/qa-include/qa-page.php on line 329
 
The error disappears if i click on other page rather than admin panel.
 
it seems that it already gets a header when i click admin panel but where?
 
I restarted the vps but the error is still there
MySQL: 5.4.13
PHP: 5.5.30-cll
 
And I also tried to remove all the sessions in /tmp
Q2A version: 1.5.4

3 Answers

+2 votes
by
selected by
 
Best answer
Usually this error occurs when you rendering anything ( HTML ) before content type or that couldn be a reason of encoding.

Many expewrts here already answered this question. http://www.question2answer.org/qa/14468/warning-header-information-headers-already-warning-message

You can check article about it as well here http://www.q2amarket.com/q2a-tips-n-tricks/warning-cannot-modify-header-information-headers-already-sent-by/
by
I found the issue, it's quite stupid.

In qa-theme-base.php
I modified by accident  |     <?php           where " | "is the beging of line
I modified it back |<?php    at the begining of line with no space and it works..

3 hours spent..
by
Yeah, There should not be any character or a space. Good you resolved.
0 votes
by

I found the issue, it's quite stupid.

In qa-theme-base.php
I modified by accident  |     <?php           where " | "is the beging of line
I modified it back |<?php    at the begining of line with no space and it works..

3 hours spent..

0 votes
by
I experienced the problem after I updated of of the php files using wrong text encoding. After changing it to UTF-8 without BOM the warnings disappeared.
...