Forum Moderators: coopster

Message Too Old, No Replies

session problem with internet explorer

         

kristof_v

11:43 pm on Sep 21, 2005 (gmt 0)

10+ Year Member



hi,

when the admin of the website logs in i make 2 session vars (name and password)
then on the admin page i check if isset $_SESSION['name'] && isset $_SESSION['password'] and if they are not == "".

in firefox this works like it should but in internet explorer it seems to lose its session vars when i redirect to the admin page :s

i found this usefull information on php.net:
If you're developing websites using the (OS-feature) of search-domains it is likely, that the browser silently discards the php-cookie-request when doing session_start() and creates a new session everytime you reload.

[1] Ie. you have the search-domain "example.de" and you're pointing with your browser to "http://www/session.php" (where the OS does the completion on its own) instead of the full name "http://www.example.de/session.php".

I assume because the browser cannot determine for which domain the cookie is for and ignores the request. So you should use the full qualified hostname + domain.

i've applied that in my code and when i opened the website with [sub.example.nl...] this worked ok but the admin however, will open the website with [otherexample.tk...] and then it doesn't work correctly anymore.

how would i be able to solve this?

grtz kristof

[1][edited by: jatar_k at 8:23 pm (utc) on Sep. 22, 2005]
[edit reason] examplified urls [/edit]

kristof_v

9:43 am on Sep 22, 2005 (gmt 0)

10+ Year Member



problem fixed :)

when i use a session_id(), it works fine