Computer Knowledge and Tutorials weblog, Computer knowledge, windows, linux, open source, programming, web apps

PHP programmer’s pervasive problem, Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at

If you are a php programmer, some times, you’ll face this problem. You’ll see this on your web page:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at …bla..bla..bla..

After trying some methods, i finally know that this caused by an error in code writing. It’s about whitespaces. Try this solutions, although i cannot guarantee that it will succeed for you, but i have tried it and it’s okay. Here’s the solution:

  1. Dont’t let a whitespace exist before the <?php that precede the session_start().
  2. Save the php file as ANSI. If you use Notepad++, you could click Format > ANSI.
  3. Some people suggest UTF-8 without BOM, but i manage to fix everything without applying this.

If you have more solutions, just add it on the comment form.

Tags:

Google
 

One Response to “PHP programmer’s pervasive problem, Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at

Leave a Reply

282 views