Thread: Session Error
View Single Post

  #2 (permalink)  
Old 07-25-2006
David Haynes
 
Posts: n/a
Default Re: Session Error

Michael Maus wrote:
> Hi,
>
> the following php-snippet:
>
> /<?
> // Fahrzeugverwaltung
> // index.php
> session_start();/
> //
> /// user-check
> if (!isset($_SESSION['status']))
> {
> session_write_close();
> header("Location: login.php");
> }/
> //
> /[...]/
>
> /?>/
>
> produces:
>
> /Warning: session_start() [//function.session-start/
> <http://www.crea.de/kunden/hmwa/function.session-start?PHPSESSID=5b6f958962576f38bbee30f991d04c3e>/]:
> Cannot send session cache limiter - headers already sent (output started
> at /kunden/crea.de/webseiten/kunden/hmwa/index.php:1) in
> //webseiten/kunden/index.php on line 4/
>
> (Linux System)
>
> I don't see, where a "<?" or two comment-lines could cause a header-output?
>
> Thank you for any help!
>

Do you have short tags enabled in your php.ini?
If not, <? should be <?php and <? would be the start of output.

-david-

Reply With Quote