[PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Matt Babineau

If I set the SESSION autostart = 1 in the PHP config, would that
eliminate my need to use session_start() in my code? I have some PHP
inline with some HTML, and the PHP is telling me:
 
Warning: Cannot send session cookie - headers already sent
 
Any ideas how to remedy this?
 
Matt Babineau
MCWD / CCFD
-
e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
p: 603.943.4237
w:  http://www.criticalcode.com/ http://www.criticalcode.com
PO BOX 601
Manchester, NH 03105
 



Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Andrey Hristov

Try with output buffering.

Regards,
Andrey Hristov
 
- Original Message - 
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 6:20 PM
Subject: [PHP] $_SESSION - autostart, or session_start() ?


 If I set the SESSION autostart = 1 in the PHP config, would that
 eliminate my need to use session_start() in my code? I have some PHP
 inline with some HTML, and the PHP is telling me:
  
 Warning: Cannot send session cookie - headers already sent
  
 Any ideas how to remedy this?
  
 Matt Babineau
 MCWD / CCFD
 -
 e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 p: 603.943.4237
 w:  http://www.criticalcode.com/ http://www.criticalcode.com
 PO BOX 601
 Manchester, NH 03105
  
 


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




Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Martin Clifford

The error is pretty self-explanatory.  You aren't starting the session before 
soemthing is being written to the page.

This will yeild the same error:

-top of document--
!-- BEGIN DOCUMENT 
?php session_start(); ?
-botton of doc-

This is because something has been sent to the browser (the comment line), which is 
after the HTTP headers have already returned from the server.

HTH

Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/


 Matt Babineau [EMAIL PROTECTED] 07/17/02 11:20AM 
If I set the SESSION autostart = 1 in the PHP config, would that
eliminate my need to use session_start() in my code? I have some PHP
inline with some HTML, and the PHP is telling me:
 
Warning: Cannot send session cookie - headers already sent
 
Any ideas how to remedy this?
 
Matt Babineau
MCWD / CCFD
-
e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] 
p: 603.943.4237
w:  http://www.criticalcode.com/ http://www.criticalcode.com 
PO BOX 601
Manchester, NH 03105
 


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




Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread 1LT John W. Holmes

Call session_start() before ANY output. html is OUTPUT. 

---John Holmes...

- Original Message - 
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:20 AM
Subject: [PHP] $_SESSION - autostart, or session_start() ?


 If I set the SESSION autostart = 1 in the PHP config, would that
 eliminate my need to use session_start() in my code? I have some PHP
 inline with some HTML, and the PHP is telling me:
  
 Warning: Cannot send session cookie - headers already sent
  
 Any ideas how to remedy this?
  
 Matt Babineau
 MCWD / CCFD
 -
 e:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 p: 603.943.4237
 w:  http://www.criticalcode.com/ http://www.criticalcode.com
 PO BOX 601
 Manchester, NH 03105
  
 


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