Hello,
Do you have output buffering enabled in your php.ini file ?
--snip--
; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit. You can enable output buffering during runtime by cal
Hi Michael,
session_start(); must be the very first line of code on the page, with no
whitespaces trailing, else you'll get the 'header already sent' message:
Hth,
Andre
On Monday 12 July 2004 10:40 am, Michael Purdy wrote:
> Folks
>
> I am a new to php. I am currently learning about session
> When experimenting with a few simple lines of code
>
> This is line 14
>session_start();
>
>
> I get the following errors:
>
> Warning: session_start(): Cannot send session cookie - headers already sent by
> (output started at e:\http\cgi\a.php:14) in e:\http\cgi\a.php
From: http://www.php.net/manual/en/function.session-start.php
"Note: If you are using cookie-based sessions, you must call
session_start() before anything is outputted to the browser."
You have to put session_start before anything else.
On Mon, 2004-07-12 at 15:40, Michael Purdy wrote:
>
> W
4 matches
Mail list logo