Headers already sent
I think when scheduled task is running like this (?scheduled=task;ts=1515043800) there is an error reported like this (Headers already sent in /var/www/clients/clientXXX/webXXX/web/index.php at line 33).
I believe this is due to MultiTenancy addon but I need a direction to check for this to fix it.
Thank you in advance.
Re: Headers already sent
Reply #1 –
Depends on the direction you need.
In general it just means that the header function was called before the one in index.php at line 33.
The reason... well, most of the cases an error that for some reason sends an header too early in the games.
Re: Headers already sent
Reply #3 –
hmm...
There is no other errors?
Did you try running manually the scheduled task?
As I said, usually the headers already sent is due to a previous error firing, so I think that finishing the request before is just a silencing the error, sort of adding a @.
Re: Headers already sent
Reply #4 –
Yes. I did try manually running the scheduled task but there is no error. I also waited until now, and still no error.
The addon does not modify ScheduledTasks.controller.php, so I am not sure which part of the modification (or even hook) triggers the header send when fastcgi_finish_request() is run first before the scheduled tasks.
I can only follow the error if it is there but they are just the same if I am using the default index.php. So I am clueless to figure out other solution.
Re: Headers already sent
Reply #6 –
I don't think so or at least not that I remembered anything about it while browsing the code, but I will check it out today. Thanks for the tips.
Re: Headers already sent
Reply #7 –
BTW: 1.0 or 1.1?
Because on 1.0 I remember seeing such errors around but I think it was fixed in 1.1?
Re: Headers already sent
Reply #8 –
I am using 1.1 now with the addon as well. What were the errors in 1.0 and how was that fixed? May be that will help me in narrowing this down.
Re: Headers already sent
Reply #11 –
Check the error log file. Anything relevant?