Troubleshooting “Warning: session_start(): Cannot send session cache limiter - headers already sent”

后端 未结 15 1765
醉酒成梦
醉酒成梦 2020-11-28 14:34

i am getting Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at error

<
15条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 14:50

    Generally this error arise when we send header after echoing or printing. If this error arise on a specific page then make sure that page is not echoing anything before calling to start_session().

    Example of Unpredictable Error:

     

    One more example:

     
    

    Conclusion: Do not output any character before calling session_start() or header() functions not even a white-space or new-line

提交回复
热议问题