Thanks for the response!

The data that gets put into the session variables are simple strings....
nothing to wierd, here is an example of what the session variables would
look like:
$sess_uid = "20";
$sess_acl = "3";
$sess_fname = "Jason";
$sess_lname = "Bell";
$sess_uname = "jbell";
$sess_auth = "1";

The only thing stored in the DB is the data...


On another note.... during my drive home, I realized something that may or
may not have an effect on this..... my server is clustered.....  could this
be having some adverse effect on the sessions? Anyone have experience with
sessions on a clustered server?

----- Original Message -----
From: "Warren Vail" <[EMAIL PROTECTED]>
To: "Jason Bell" <[EMAIL PROTECTED]>; "PHP Users"
<[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 9:52 PM
Subject: RE: [PHP] Dissapearing Session Variables (long post)


> Jason,
>
> I had a similar problem using a php session table in MySQL to store
session
> data, turns out my  data item was too small to contain all my registered
> session variables, I changed the definition of the data column to TEXT and
> that seemed to do it.  I also found that I needed to run addslashes()
before
> updating the column and stripslashes() retrieving it (turns out some of my
> variables contained characters that MySQL was sensitive to, and others
that
> caused serialize/unserialize problems).
>
> Not sure this is your problem, but it's worth checking.
>
> Warren Vail
>
> -----Original Message-----
> From: Jason Bell [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 05, 2001 4:54 PM
> To: PHP Users
> Subject: [PHP] Dissapearing Session Variables (long post)
>
> Hello! I'm trying to figure out why my session variables keep hiding....
>
> Background:
>
> On my site, I have a login box, which allows you to login. This login box
> works as expected. It authenticates the provided credentials against my
> database, and then sets some pre-registered session variables to values
> pulled from the DB. What I am experiencing, is that my session variables
> will be defined, and then lose their values when the first link is
followed.
> I've placed a reference to $PHPSESSID into the title of the page, and note
> that the $PHPSESSID remains constant. Is there something in my code that
is
> causing this? Is there a way that I can rewrite my code to help avoid
this?
>
> Here is my index.php, other relevent code to follow:
>
> <?
> include("include/user.conf");
> if (!$theme) { $theme = "default"; };
> include("include/core_functions.php");
> if ($AuthAction) {
>  switch($AuthAction) {
>   case login:
>    include("include/db.conf");
>          $sql = "SELECT uid,username,password,first,last,acl FROM users
> WHERE username='$username' AND password=PASSWORD('$password')";
>          $result = mysql_query($sql) or die ('Unable to execute SQL
> Query.');
>          $dberror=mysql_error();
>          $dbnum=mysql_errno();
>          if ($dberror) {
>            $AuthErr = $dberror;
>             } else {
>                  $num = mysql_numrows($result);
>                  if ($num !=0) {
>                    $sess_uid = mysql_result($result,0,"uid");
>                      $sess_acl = mysql_result($result,0,"acl");
>                      $sess_fname = mysql_result($result,0,"first");
>                      $sess_lname = mysql_result($result,0,"last");
>                      $sess_uname = mysql_result($result,0,"username");
>                      $sess_auth = "1";
>                   } else
>
>        $AuthErr = "<FONT SIZE=-1 COLOR=RED>Login Incorrect!</FONT>";
>                   };
>         };
>    break;
>   case logout:
>    break;
>  }
> };
> if (!$action) { $action = tba; };
> if (!$title) { $title = "$PHPSESSID"; };
> if (!$headline) { $headline = "<H2>An E-Haven for Displaced
> Northpointers<H2>"; };
> include("Themes/".$theme."/".$theme.".theme");
> ?>
>
> Here is user.conf:
>
> <?php
> if (!$PHPSESSID) {
>       $sess_uid = "";
>       $sess_acl = "";
>       $sess_fname = "";
>       $sess_lname = "";
>       $sess_uname = "";
>       $sess_auth = "";
>                   session_register('sess_uid');
>                   session_register('sess_acl');
>                   session_register('sess_fname');
>                   session_register('sess_lname');
>                   session_register('sess_uname');
>                   session_register('sess_auth');
>                   };
> ?>
>
>
> Shouldn't this work?  I reference the session variables within functions,
> but that shouldn't effect anything. I always make sure to call global for
> each variable before I use it....    any ideas?
>
> Thanks in advance!
>
> Jason Bell
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to