tags:

views:

35

answers:

3

hi, 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.

+2  A: 

It may be a Byte Order Mark generated by your text editor.

Ignacio Vazquez-Abrams
+2  A: 

Check if there are any whitespaces before <? If there is any output before session_start() - it will not work

habicht
+1. Specifically, check line one of C:\xampp\htdocs\test3\index.php as indicated by the error message.
Frank Farmer
+1  A: 

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 */

?>
Jonathan Sampson