Reputation: 735
can someone please tell me what Im missing? this simple script
<?
session_start();
?>
displays the following error message:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\test3\index.php:1) in C:\xampp\htdocs\test3\index.php on line 2
thanks.
Upvotes: 0
Views: 1079
Reputation: 268414
session_start();
should be the first thing on your page. Before any text, or spaces. Nothing should precede it in your page.
<?php
session_start();
/* code here */
?>
Upvotes: 1
Reputation: 1493
Check if there are any whitespaces before <?
If there is any output before session_start()
- it will not work
Upvotes: 2
Reputation: 799082
It may be a Byte Order Mark generated by your text editor.
Upvotes: 2