Re: Sessions simply do not work?

From: Date: Tue, 25 May 2004 13:02:19 +0000
Subject: Re: Sessions simply do not work?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-186884@lists.php.net to get a copy of this message
I've never had a problem using sessions. Do you have a sample piece of simple session code that isn't working? You also need to have cookies enabled on your client if you are using the default session management technique. Your very first line of code, before you do anything else, should be session_start(). Actually, it can be in and "include" file, but I recall having problems if I did other stuff first. For instance, all my php files, except the logion, begin like this: <?php require('sessionInit.php'); That file checks for an existing session and retrieves session variables or redirects to a login screen if no session was found. Also, check your php configuration for sessions. You can use phpinfo() to check your configuration, there is a section on sessions. You might even have session support disabled. On May 24, 2004, at 5:57 PM, Michael R. Wayne wrote:
In my continuing efforts to actually get sessions to work, I upgraded to PHP 4.3.6 and apache 1.3.31. This did not make the slighest difference. So, does ANYone have ideas of how to debug this? Or is PHP simply broken and no longer able to maintain sessions? /\/\ \/\/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#186884) next »