[SOLVED] strange header problem
Posted: Mon Sep 20, 2004 11:23 pm
hello,
I have a strange problem with my script, it send's an error thet header are allready sent. There is not any output, echo, space bla bla before the header.
I say is strange because this actually works if in all my scripts I put session_start();
but the problem is that the script should be on a password protected area.
so if I include in each file authentication.php than it stoppes working and gives me the header problem.
the authentication is something like this:
Any ideeas?
Thx
I have a strange problem with my script, it send's an error thet header are allready sent. There is not any output, echo, space bla bla before the header.
I say is strange because this actually works if in all my scripts I put session_start();
but the problem is that the script should be on a password protected area.
so if I include in each file authentication.php than it stoppes working and gives me the header problem.
the authentication is something like this:
Code: Select all
<?php
session_start();
if(!isset($_SESSION['admin'])){
header ("location: logout.php");
exit;
}
if(!isset($_SESSION['password'])){
header ("location: logout.php");
exit;
}
if((time() - $_SESSION['timestamp']) > 30){
header ("location: logout.php");
exit;
}
else{
$_SESSION['timestamp'] = time();
}
?>Thx