FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » strange session problem
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
strange session problem [message #8258] Mon, 20 January 2003 09:19 Go to previous message
tufan is currently offline  tufan   Turkey
Messages: 70
Registered: June 2002
Karma:
Member
the following code doesn't work on linux apache 1.3.27, php 4.2.3 with register_globals=off:

<?php
session_start();

if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
} else {
    $_SESSION['count']++;
}
echo "Count: {$_SESSION['count']}";
?>


every time you reload the page, a new PHPSESSID seems to appear, and the count is always 0. If you pass the PHPSESSID in links, everything is ok. It seems there is something wrong with the cookies, but i cannot guess what (cookie settings were open in the all browsers we tried)

Strangeness is, the very same code works on another linux machine with same configuration (We even tried copying php.ini from the working machine to the one which doesn't work, but it didn't help).

any idea why it doesn't work?


http://sfx-images.mozilla.org/affiliates/Buttons/firefox2/firefox-spread-btn-1.png
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Help! mail() isn't working...
Next Topic: Does anyone have Traditional Chinese translation?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 15:26:47 GMT 2024

Total time taken to generate the page: 0.06496 seconds