--- Pance <[EMAIL PROTECTED]> wrote: > I've been using the same code to verify a persons login for more than > a year - but I've been having some problems lately - I get past the > login, but the session times-out after about 30 seconds or a minute. My > new server is using PHP ver 4.3.3.
One thing jumps out at me - new server. Compare all session-related php.ini values as a first step. There is a lot that controls the behavior of sessions that lies outside of your code. > I've also read the docs on "sessions" and I've taken their suggestion > and have stopped using session_register("user_id"). I now use > $_SESSION["user_id"]). > > But, like I said after about a short minute, I get the following error > message: > > Notice: Undefined index: user_id in /home/pance/public_html/menu.php on > line 13 You should also write a small test script for debugging. The problem might very well be buried underneath complexities in your code. As an example: <? session_start() if (!isset($_SESSION['foo'])) { $_SESSION['foo'] = 0; } else { $_SESSION['foo']++; } echo "<p>Previous visits: {$_SESSION['foo']}</p>"; ?> Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming mid-2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php