session confusion

From: Date: Fri, 23 Jun 2000 08:00:05 +0000
Subject: session confusion
Groups: php.general 
Request: Send a blank email to php-general+get-2757@lists.php.net to get a copy of this message
I'm very confused about PHP's implementation of sessions based on what little documentation I've found thus far. first let me state that I came from an ASP background where sessions are super-easy. I don't know how they were implemented, I just know that all I had to do was give variables to the session object, and later I could pull them back out. to get to the point, here are the problems I'm having. 1. I have a simple login.php that starts a session, registers a flag "sessionActive", and then calls login2.php. login2.php checks to see whether "sessionActive" is registered. if so, it prints a positive message. in netscape (latest version with RH6.2), all is well at first. I click refresh and I get the same page (as I should.) I click refresh again and I get a netscape dialog box error "Netscape is unable to find the file or directory named /tmp/nsform3952D20E0B0082B. Check the name and try again." this same thing happens if I merely resize the window rather than click refresh twice. NOTE: I have no problems with my test scripts on IE5 or Mozilla. 2. I understand that php sessions normally use cookies. what's the alternative? I've thought about writing my own version of a session concept using database calls to store variables, but I don't know how to identify to whom they belong. I read that you can't go by IP because users from the same ISP may end up with same IP (I'm not sure I buy this... how would apache send a response?) this is all blah blah, but basically I'm totally confused over a topic that seems like it should be simple (and based on the amount of coverage in the PHP4 docs, the developers must think it's pretty simple.) hopefully someone can provide some direction for me (direct help or pointers to other information.) my project is a "simple" web interface to a database. I want to have a login form that hits the database to validate the user (and determine what other actions that user is allowed to take.) then I'll have a few intelligent pages that will allow the user to do other database stuff (as long as I have state information so I know who is now attempting to do this other stuff.) etc. etc. I can clarify more if it will help. many thanks, michael teter ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

« previous php.general (#2757) next »