Re: [PHP] Ob_start question

2003-09-03 Thread Raditha Dissanayake
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Ob_start question

2003-09-03 Thread Ford, Mike [LSS]
On 03 September 2003 03:11, Beauford.2005 contributed these pearls of
wisdom:

 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 

... but, according to the error message, output is started in
2004server.inc, nonetheless -- on line 5, to be precise.  What is on line 5
of 2004server.inc?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Ob_start question

2003-09-03 Thread Beauford.2005
This is line 5.. 

$email_error = BRIf the problem persists email A
HREF=mailto:[EMAIL PROTECTED]Webmaster/A;

but I believe the error message refers to line 5 of restricted.in, not
2004server.inc.

This is line 5 of restricted.inc  session_start();


-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] 
Sent: September 3, 2003 5:20 AM
To: 'Beauford.2005'; PHP
Subject: RE: [PHP] Ob_start question


On 03 September 2003 03:11, Beauford.2005 contributed these pearls of
wisdom:

 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 

... but, according to the error message, output is started in
2004server.inc, nonetheless -- on line 5, to be precise.  What is on
line 5 of 2004server.inc?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS,
LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ob_start question

2003-09-03 Thread John W. Holmes
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
At what point are you including the .inc file, though? You must be 
including it outside of the output buffering function in order to get 
this error.

Either move the inclusion of this file within the output buffering or 
fix whatever is causing output on line 24 of 2004server.inc.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Ob_start question

2003-09-03 Thread Ford, Mike [LSS]
On 03 September 2003 12:50, Beauford.2005 contributed these pearls of wisdom:

 This is line 5..
 
 $email_error = BRIf the problem persists email A
 HREF=mailto:[EMAIL PROTECTED]Webmaster/A;
 
 but I believe the error message refers to line 5 of
 restricted.in, not 2004server.inc. 
 
 This is line 5 of restricted.inc  session_start();

Sorry, my mistake -- the relevant part of the error message is:

(output started at /usr/local/apache/php/includes/2004server.inc:24)

so I should have asked about line *24* of 2004server.inc, not line 5!


Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ob_start question

2003-09-03 Thread Curt Zirzow
* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 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

As the error says it has to do with line 24 of 2004server.inc.  and
most likely looks like this:

?

EOF

or

? EOF


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Ob_start question

2003-09-03 Thread Beauford.2005
Yep, that's it. I thought I had this as it was working at one time, but
obviously some spaces got added.

Thanks.

-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: September 3, 2003 11:13 AM
To: PHP
Subject: Re: [PHP] Ob_start question


* Thus wrote Beauford.2005 ([EMAIL PROTECTED]):
 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

As the error says it has to do with line 24 of 2004server.inc.  and most
likely looks like this:

?

EOF

or

? EOF


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php