Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Chris Shiflett
--- Dino Tsoumakis [EMAIL PROTECTED] wrote:
 Warning: session_start(): Cannot send session cache limiter - headers
 already sent (output started at XX/class.session.php:61) in
 XX/class.session.php on line 38

You need to either put session_start() prior to any output (my preference)
or use output buffering by putting ob_start() prior to any output.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
HTTP Developer's Handbook
 http://httphandbook.org/

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



Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Dino Tsoumakis

Chris Shiflett [EMAIL PROTECTED] wrote
news:[EMAIL PROTECTED]
 --- Dino Tsoumakis [EMAIL PROTECTED] wrote:
  Warning: session_start(): Cannot send session cache limiter - headers
  already sent (output started at XX/class.session.php:61) in
  XX/class.session.php on line 38

 You need to either put session_start() prior to any output (my preference)
 or use output buffering by putting ob_start() prior to any output.

If you hve a close look at the code http://www.serv-int.de/class.session.txt
you will find the session_start() in the constructor of the class prior to
any output.
The thing is, that session_start() calls the user defined session functions
(defined in session_set_save_handler()) and that's what breaks the whole
thing.
This is not a problem of session_start(), I'm pretty sure.
The problem is, the session id is not set in the open function, but it is
set in the read function.

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



Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Chris Shiflett
--- Dino Tsoumakis [EMAIL PROTECTED] wrote:
 If you hve a close look at the code
 http://www.serv-int.de/class.session.txt you will find the
 session_start() in the constructor of the class prior to any output.

This is apparently not the case, else this error message would not appear.

 The thing is, that session_start() calls the user defined session
 functions (defined in session_set_save_handler()) and that's what
 breaks the whole thing.

Keep in mind that an error message can count as output (if it's not logged
instead).

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
 Coming mid-2004
HTTP Developer's Handbook
 http://httphandbook.org/

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