Reply to Re: beating a horse that won't die

Your name:

Reply:


Posted by J.O. Aho on 11/23/05 09:32

joeblow wrote:
> It seems that everyone avoids these $_SESSION questions like the plague. Is
> it because there is too much involved to diagnose from a distance?
>
> Because I swear, if I don't find this problem I think I'm gonna slit my
> wrists. I've been trying to get sessions to work for months and it just
> doesn't happen. I've read article after article, the manual, tutorials, etc.
> and can't find a description of the mechanism that causes sessions and
> cookies to work together. The manual describes using the URL to propagate
> the id, but not the mechanism behind cookies.
>
> With WinXP, IE6, PHP5, are there any undocumented issues anyone has learned?
>
> The session writes files and stores relevant data, but $_SESSION is unable
> to access the values after navigating to another page.
>
> How do sessions work with cookies?

You need to see that no output from the PHP pages is generated before you use
the session, eg

---start of file---

<?PHP
...
?>
--- end of file ---

This page wouldn't work for sessions, as there is a newline on it.
You should run session_set_cookie_params() if your default settings aren't
okey, the broken browser (MSIE) has problems if there hasn't been a domain and
path set.


//Aho

[Back to original 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

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