Life, SAP, Consulting, Programming, Coding, ASP.NET, Sharepoint, MVC, Javascript, PHP, WebDesign, CSS, HTML

Cannot modify header information – CAKEPHP

I recently try CAKEPHP platform. Soon, I encountered with many problem. But after that, I have fixed them all, and learned new experiences.

Cannot modify header information

This error occurred when I tried to apply login validation on my server. XXXController requires logged-in user. Each controller went well. Except that when users not logged in, XXX will redirect to Users/login. This is point I got my erro. I tried some search. There are many people had encountered the same error. Almost guru say that It was dued to WHITESPACE out side of <?php ?> tag. I had checked many time my controllers. No WHITESPACE. I cleared my controller. Rewrote them. No use. Finally, I noted that I used HTML comment <!–comment –> out side of the <?php ?> tag. I had removed these comment. Aha. They are not truly WHITESPACE, but they gave madness. Hope this post will help some new dummy like me.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: