Welcome to WebmasterWorld Guest from 54.196.244.206

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Session Array is empty

     
6:14 pm on Dec 15, 2011 (gmt 0)

Junior Member

joined:Oct 19, 2011
posts: 161
votes: 0


I am building a menu based on a session variable. If it's admin, then echo out the admin full menu. If superuser, echo out the super user menu which has less stuff in it.

I have tried this on my machine(XP) and on my laptop (ubuntu linux) and my father's machine(mint linux). When it is run on a windows 7 machine, the session array is blank and the menu is not displayed. How is that possible?
I don't get it!

Can anyone shed some light on this so it can work for EVERYONE?
Thanks!
6:40 pm on Dec 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


Have you tried different browsers on the Win7 machine?

The session is probably dependent on a cookie being set in the browser, I can only guess that the cookie is being blocked on that machine? As otherwise the client should not affect the server-side session.
6:57 pm on Dec 15, 2011 (gmt 0)

Junior Member

joined:Oct 19, 2011
posts: 161
votes: 0


It's been tried on two win7 laptops. I will ask about cookies.
10:53 pm on Dec 15, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Feb 22, 2009
posts:1396
votes: 0


>>The session is probably dependent on a cookie being set in the browser.

Ensure that ALL browsers have permissions/abilities to set cookies/sessions - as essentially they are both the same thing.

Also, put some code in to varify that cookies/sessions have been set as expected, or just pop a friendly message on stating that your site requires cookies/sessions turned on in order to function.

Hope that makes sense.

Cheers,
MRb
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members