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

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]


Удаленная работа для программистов  •  Как заработать на 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

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