You are here: Re: Sessions Again « PHP Programming Language « IT news, forums, messages
Re: Sessions Again

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация