Posted by Janwillem Borleffs on 12/11/05 00:16
Arnold Shore wrote:
> With 'session_start()', how do I avoid the complaint "PHP Notice: A
> session had already been started" ?
Normally this happens when the session.auto_start directive has been enabled
in the php.ini file while calling session_start().
> Without 'session_start()', I get the "Undefined variable: _SESSION "
> complaint.
>
This should not happen when you do a simple "print_r($_SESSION)" on top of
your script and sounds like a configuration problem. Ask your administrator
about this.
> Any hope? (I'll be happy simply to suppress the error message,
> although I AM trying to understand what's behind it.).
>
Prepending an at-sign will surpress the notice:
@session_start();
JW
Navigation:
[Reply to this message]
|