[PHP] Sessions on Win2k
Hi, I've searched the archives and note that many have probelms using session on a Win2K server. I am getting a Undefined index: sessions in D:\inetpub\mydomain\www\forms\formmail\formmail.php on line 768 error. Line 768 is: session_start(); It works Ok on Linux; is there any special Windows configuration? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions on Win2k
Session_start() has to be the first thing at the top of the page before anything else. Even header info. I just got this answered for me about two weeks ago -Original Message- From: Donpro [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 10:20 AM To: php list Subject: [PHP] Sessions on Win2k Hi, I've searched the archives and note that many have probelms using session on a Win2K server. I am getting a Undefined index: sessions in D:\inetpub\mydomain\www\forms\formmail\formmail.php on line 768 error. Line 768 is: session_start(); It works Ok on Linux; is there any special Windows configuration? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. **
RE: [PHP] Sessions on Win2k
On 11 February 2004 16:39, Alex Hogan contributed these pearls of wisdom: Session_start() has to be the first thing at the top of the page before anything else. Even header info. Er, no. session_start() itself generates headers, so it doesn't matter whether it goes before or after other headers. It also doesn't matter how much code is before your session_start(), so long as none of it generates any actual page content of any kind (and that includes whitespace). So it could be perfectly valid to have a session_start() on line 768, if everything preceding it is PHP initializations and logic -- and the error message isn't about headers being output at the wrong place, so I'm guessing that isn't it. Unfortunately, I don't have any real idea what *could* be the problem here, but I wanted to stop the OP haring off on a wild goose chase...! 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] Sessions on Win2k
Sorry..., my bad I was just relating what I thought had been related to me for the same question. I think I'll stick to the asking and not the answering for a while longer... Gotta go goose is waiting.. -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 11:00 AM To: 'Alex Hogan'; php list Subject: RE: [PHP] Sessions on Win2k On 11 February 2004 16:39, Alex Hogan contributed these pearls of wisdom: Session_start() has to be the first thing at the top of the page before anything else. Even header info. Er, no. session_start() itself generates headers, so it doesn't matter whether it goes before or after other headers. It also doesn't matter how much code is before your session_start(), so long as none of it generates any actual page content of any kind (and that includes whitespace). So it could be perfectly valid to have a session_start() on line 768, if everything preceding it is PHP initializations and logic -- and the error message isn't about headers being output at the wrong place, so I'm guessing that isn't it. Unfortunately, I don't have any real idea what *could* be the problem here, but I wanted to stop the OP haring off on a wild goose chase...! 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 ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. **