Re: Ob_start question
| From: | Raditha Dissanayake | Date: | Wed, 03 Sep 2003 07:01:53 +0000 |
| Subject: | Re: Ob_start question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161521@lists.php.net to get a copy of this message | ||
Most common cause of this problem is whitespace before the '<?'
Beauford.2005 wrote:
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(); ?>-- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads.