codeofaninja
website

Fixed: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent...

Photo of Mike Dalisay
Modified Friday, September 13, 2013
by - @ninjazhai
Okay, so many of you guys still ask me about how to fix these warning messages in our Facebook scripts. Today I'm going to give you two possible fixes that you can do. By the way, here's the warning message we want to remove:





Fix it by adding a session_start()


You can fix it by adding a session_start() on top of your PHP file, just right after your first line <?php tag. It looks like this:




Fix it by moving Facebook instance


You can fix it by moving the Facebook class and instance code on top of your PHP file. It would look like this:



If none of them worked, you can read more here.
For FREE programming tutorials, click the red button below and subscribe! :)
Thanks for the comments!
 
 
Fundamentals
"First do it, then do it right, then do it better."
~ Addy Osmani
"Talk is cheap. Show me the code."
~ Linus Torvalds
Let's Stay Connected!
g+ r
Android app on Google Play
© 2011-2014 The Code Of A Ninja. All rights reserved. Proudly Powered by Google Blogger. Images, logos, marks or names mentioned herein are the property of their respective owners.