|
Posted by Alvaro G. Vicario on 12/11/05 00:31
*** Arnold Shore escribió/wrote (Sat, 10 Dec 2005 16:36:10 -0500):
> With 'session_start()', how do I avoid the complaint "PHP Notice: A session
> had already been started" ?
> Without 'session_start()', I get the "Undefined variable: _SESSION "
> complaint.
>
> Any hope? (I'll be happy simply to suppress the error message, although I AM
> trying to understand what's behind it.).
Try this on top of your code:
ini_set('session.auto_start', '0');
I haven't tested but may do the trick. In any case, it'd be interesting to
see the actual code that claims about $_SESSION being undefined, because
when you start a session twice the exact notice is:
A session had already been started - ignoring session_start()
"Ignoring" sounds like, well, no point in using that code :-?
--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--
Navigation:
[Reply to this message]
|