Ob_start question
| From: | Beauford.2005 | Date: | Wed, 03 Sep 2003 02:10:55 +0000 |
| Subject: | Ob_start question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161511@lists.php.net to get a copy of this message | ||
I am getting this error:
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
/usr/local/apache/php/includes/2004server.inc:24) in
/usr/local/apache/php/includes/restricted.inc on line 5
I have ob_start(); and ob_end_flush(); at the beginning and end of
restricted.inc. Like the following. Could someone explain why I am still
getting the above error. 2004server.inc is just the mysql server
info....
TIA
<?
ob_start();
session_start();
if(!isset($_SESSION['logged'])) {
$_SESSION['goto'] = $_SERVER['REQUEST_URI'];
$url = "http://www.mysite.net/login/login.php";
header("Location: $url");
}
ob_end_flush();
?>