Forum Moderators: phranque

Message Too Old, No Replies

php sessions problems

problem

         

xor19

4:40 pm on May 24, 2005 (gmt 0)

10+ Year Member



I've just reinstalled my windows and everything started falling apart :) Whenever a user tries to login in to my site, he fails with no error (until the reinstall everything was fine. besides, i've reinstalled apache, php and still the same problem) To ilustrate what i mean here is a short example:

first file:
<?php
session_start();
$_SESSION['user'] = "blah";
echo isset($_SESSION['user']);
?>

<a href="next.php">next</a>

second file:
<?php
session_start();
echo isset($_SESSION['user']);
?>

In the first site you get "1", just as expected, but the second one returns false (empty line). I don't know what to do. Anyone, please help..

sitz

6:32 pm on May 25, 2005 (gmt 0)

10+ Year Member



This question is likely better asked in the PHP Forum [webmasterworld.com].

xor19

8:10 pm on May 25, 2005 (gmt 0)

10+ Year Member



oh never mind.. finally i understood what was the problem. the problem was that the browser was not accepting the cookies. the site needed to be compatible with the "compact privacy policy" (whatever that is..) =) thank's anyway. i hope this will help anyone else save a lot of time.. =)