How to Fix: Warning: session_start() [function.session-start]: Cannot send session cache limiter

peteboyd
by peteboyd in Coding on June 14th, 2009 . 2 Comments »

We recently came across this pesky problem and found these two articles very helpful.

Don’t save your UTF-8 files with BOM as it creates issues.

=================

http://juicystudio.com/article/utf-byte-order-mark.php

“Headers must be written before any data is sent to the client. Unicode files may include a Byte-Order Mark (BOM) to help distinguish the big endian and little endian byte order. Unfortunately, the BOM isn’t understood by PHP. Upon encountering the BOM, PHP assumes that it is dealing with data, by which time it’s too late to modify headers. Solution? Save the file in UTF-8 encoding without a BOM.”

and

http://69.147.83.196/bug.php?id=44563&edit=2

“If file A or file B has UTF-8 encoding then you will get the error:

Warning: session_start() [function.session-start]: Cannot send session
cache limiter – headers already sent (output started at index.php:1) in
session.php on line 3

Using UTF-8 encoding WITHOUT BOM (Byte Order Mark) seems to fix the
problem.”

=================

If file A or file B has UTF-8 encoding then you will get the error:

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at index.php:1) in
session.php on line 3

Using UTF-8 encoding WITHOUT BOM (Byte Order Mark) seems to fix the
problem.

2 Responses to “How to Fix: Warning: session_start() [function.session-start]: Cannot send session cache limiter”

  1. viderbit says:

    Omg thanks bro, i can’t believe that BOM can make browser to thing that receive header information instead BOM signature…

  2. Tinu says:

    please ensure that these is nothing before session_start() command. Even a white space before the session_start() command will generate this warning message

    Wrog:

    Correct:

Leave a Reply

Search

About Us

  • PaperStreet creates new web sites and revitalizes aging ones. In addition to creating web sites that are engaging, we also have a knack for getting results.
    Read More »

Our Services