You are here: Re: -> PHP4 Singleton implementation question <- « PHP Programming Language « IT news, forums, messages
Re: -> PHP4 Singleton implementation question <-

Posted by Jerry Stuckle on 12/01/06 13:08

Steve JORDI wrote:
> Jerry,
> thanks for your explanations.
>
> I did actually try to save the variable as a session one, but
> it didn't seem to work.
>
> I had a
> start_session() ;
>
> Then, when entering or re-entering my page, it tests
> if( !isset($_SESSION['welcome']) )
> $_SESSION['welcome'] =& Welcome::GetInstance() ;
>
> Problem is that it correctly get the instance the first time,
> but gets it again each time I re-enter my page.
>
> Shouldn't $_SESSION['welcome'] be saved within the session?
>
> From the literrature I read, it's the way to go, but clearly,
> something's wrong, I'm missing something.
>
>
>
> Sincerely,
> Steve JORDI
>
> (Remove the K_I_L_LSPAM from my email address)
> ------------------------------------------------
> 1197 Prangins Email: stevejordiK_I_L_LSPAM@hotmail.com
> Switzerland WWW: www.sjordi.com
> ------------------------------------------------
> Volcanoes at www.sjordi.com/volcanoes
> MovieDB at www.sjmoviedb.com
> ------------------------------------------------

Yes, and if your session is working, you it will be. Are you sure
NOTHING is sent to the browser before the session_start() call? No
white space, no DOCTYPE, nothing?

Enable all errors on the page by adding this at the top of your PHP code:

ini_set("display_errors","1");
error_reporting(E_ALL);

And see what you get.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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