Session cookie problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
delorian
Forum Contributor
Posts: 223
Joined: Sun May 04, 2003 5:20 pm
Location: Olsztyn, Poland

Session cookie problem

Post by delorian »

Hi,
I have a simple question that boders my mind. I'm using a session which controls counter "mechanism".

After session declaration, start...., which is typical, I've got something like this:

Code: Select all

if(!isset($_SESSIONї'hit'])) { 
  $_SESSIONї'hit'] = $statistic->counter(); // hit=counter_value
}
Everything else is OK (class object $statistic works fine), but on some systems, like WXP, the session seems not to write it's cookie to the user system, because after clicking on some url on my site counter increases. I have the same script on some other server and there it's OK. I don't know where the problem is. Maybe I should always check if the session cookie is set and if not put the session id through the url :?:
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

session examples on php.net have some good examples how sessies work on other settings, like register_globals on or off.
Post Reply