i need to bounce a problem off you guys that is driving me crazy

i made a php login with sessions
it logins in fine then as soon as
i switch pages it loges me off and i did echo the ssid out
and the session id does change on ever click

php and mysql are updated to the newest release and it's running on a linux server

if you want me to post the code i will but its rather big

Recommended Answers

All 11 Replies

Member Avatar for diafol

You are putting session_start() at the top of each page right?

Member Avatar for nevvermind

If in need (very large source code), use pastebin and post the link.

yes session start is on top of the page all also tried it on top of the other pages that get included

Member Avatar for diafol

Have you got any other session-based functions running, like a session regenerator? Sorry, but grasping at straws - perhaps you could isupply the relevant code.

this is what i found works great in winxp but anything related to sessions works on current page then the session id changes when using windows vista , 7 but if you turn on in internet exploere to accept session/third party cookies and what not it works fine is there a way around this ?

Member Avatar for diafol

If you disable cookies, sessions won't work. The session data is stored via session cookie.

sorry i might have not phrased that right the cookies are enabled but will not work untill you enable third party cookies i hate windows 7/vista works perfect on win xp im kinda lost on what to do

Member Avatar for diafol

I would have thought that all cookies are third party aren't they? Unless you're testing a local site?

yea i thought the same thing but it gets weird with win7 / win vista for some reason
i setup a lamp server with centos im not running anything weird and session / cookies from my site will not work unless i go to ie and turn on (enable third party cookies)in windows xp works perfect i have tested both local / and offsite its kinda intresting about to try cgi or perl maybe java as a login see if it clears it up or what not if you want to see the code / site your welcome to but im not going to lie im still scratching my head about it but moved on to finish the other stuff and then move back to that

Member Avatar for diafol

THis is most definitely something weird. I've never come across that before. I now undertand what you mean by 3rd party cookies- doh! However, I can't see why a cookie YOU are setting is coming across as a third party cookie. Are you using an iframe with the login form coming from a different site? I can't see how that would work to propagate your session anyway, but is your session setting/ login handler page in a different folder to your other pages? If so, it could be a path-related problem.

How about trying the session_save_path() function?

I've had problems with normal cookies and directories before, never with sessions though.

Can you at least provide us with your code...???
;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.