RE: [PHP] Sessions on Win2k
| From: | Ford, Mike [LSS] | Date: | Wed, 11 Feb 2004 17:00:13 +0000 |
| Subject: | RE: [PHP] Sessions on Win2k | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177418@lists.php.net to get a copy of this message | ||
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: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211