hi all,
ok i have created a site (Jake Welton) which uses PHP sessions to login and out. My problem is that everything works fine but when people try to connect to the site (and login) they seem to swap accounts (this is because the session contains a unique number which corresponds to the data which is returned to the user e.g. the user name next to he logout button), i am unsure how sessions can get mixed between browsers like this?????
Now heres the part which gets really strange, if two people both use explorer or Firefox then it messes up but if one person uses explorer and the other Firefox then it works fine. Is it possible that the browsers are getting their cookies (session cookies that is) from the server?????? if so how can i change this to make it work??
Basically i need a way of fixing this as it is a big problem at the moment.
Many Thanks,
J
PHP session problems
Started by welton122, Oct 08 2010 11:29 AM
2 replies to this topic
#1
Posted 08 October 2010 - 11:29 AM
|
|
|
#2
Posted 08 October 2010 - 11:57 AM
I would begin to think your problems relate to a poor host configuration (erroneous php.ini or apache host config with session_save_path), can you replicate the problem again but adding this to your script?
echo 'My Session ID: ' . session_id() . '<br/>';If session IDs are the same on separate clients (i.e. different computer) then it is a huge problem in itself as the server is confusing clients. It can be fixable but it is best to find what exactly is the problem first.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 16 October 2010 - 02:37 PM
Thanks the problem was with my server


Sign In
Create Account


Back to top









