NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP 4.3.3 and session_start

Chris Shiflett shiflett at php.net
Wed Feb 25 12:30:30 EST 2004


--- Emmanuel Décarie <emm at scriptdigital.com> wrote:
> I'd like to know why in the world, starting with PHP 4.3.3, PHP need
> to throw an error (E_NOTICE) when it encounter a second session_start

This seems like the right thing for PHP to do, in my opinion.

> But really, I don't understand the logic behind this change. If the
> second session_start is to be ignored, why then throw an error?

I hate to sound unsympathetic, but a warning seems appropriate. PHP will
still do what you're wanting, but there's no reason to have multiple
session_start() calls, so it's just letting you know.

It seems like you have your error reporting set very strict, but you want
your code to be sloppy. You have to pick one or the other. If you don't
care whether your code is sloppy, set your error reporting differently.

Chris

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

PHP Security - O'Reilly
     Coming mid-2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/



More information about the talk mailing list