[phplib] Re: phplib7.2c session weirdness From: Daniel E. Baumann (baumannd <email protected>)
Date: 09/20/00

On Wed, 20 Sep 2000, you wrote:
> Hello all I am working on a project and I am using phplib. I recently upgraded
> to phplib72.c. I have a logout script which is a link on my Menu derived
> menu class. The problem that I am encountering is that it doesn't seem to
> destroy the session or phplib is getting the wrong session from the database
> at times. If I login as an administartor and then logout login as someone
> with lesser privileges sometimes it diplays the information for the admin and
> tells me it is destroying the admin's session, and other quirky things. It
> just seems that it doesn't always get the right session. Sometimes when I
> login as someone then logout and login as someone else it displays the
> old user instead of the person I just logged in as (I have a
> redirector page that displays their name and redirects them to the
> appropriate main page based on access rights. I have permissions checking on
> all pages of course).
>
> When I was using phplib-7.3-dev from my Debian box I did not get all this
> weird behavior. The setup is identical on both boxes (I am using RedHat at
> the moment). So does anyone know of some weird session behavior with
> phplib-7.2c? Why can't I get the phplib-7.3-dev tar ball from the web site
> anymore?
>
> I also thought it might be the browser so I upgraded to netscape 4.75, but it
> didn't help.
>
> Here is my logout script:
>
> <?php
> /***************************************************************************
> logout.php3 - Logs the user out of the system.
>
> ------------------------
> Copyright : (C) 2000 by Daniel Baumann
> Email : baumannd <email protected>
> Date : 09/04/2000
>
> $Id: logout.php3,v 1.1 2000/09/14 04:32:04 baumannd Exp $
> ***************************************************************************/
>
> /***************************************************************************
> * *
> * This program is free software; you can redistribute it and/or modify *
> * it under the terms of the GNU General Public License as published by *
> * the Free Software Foundation; either version 2 of the License, or *
> * (at your option) any later version. *
> * *
> * This program is distributed in the hope that it will be useful, but *
> * WITHOUT ANY WARRANTY; without even the implied warranty of *
> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
> * General Public License for more details. *
> * *
> * You should have received a copy of the GNU General Public License *
> * along with this program; if not, write to the Free Software *
> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
> * USA. *
> * *
> ***************************************************************************/
>
> page_open(array("sess" => "TRIOSession", "auth" => "TRIOAuthorization",
> "perm" => "TRIOPermissions", "user" => "TRIOUser"));
> ?>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
> <HTML>
> <HEAD>
> <TITLE>Logout</TITLE>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <link rel="STYLESHEET" type="text/css" href="/include/mainStyle.css">
> <META NAME="author" CONTENT="Daniel E. Baumann">
> <META NAME="copyright" CONTENT="Copyright &copy; 2000 Milwaukee School of Engineering">
> <META NAME="description"" CONTENT="">
> <META NAME="keywords" CONTENT="TRIO Web Management System, SourceForge, free software">
>
> </HEAD>
>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#993399" ALINK="#FF0000" BACKGROUND="/graphics/stdback_sm.gif">
>
>
> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="620">
> <TR>
> <TD><IMG SRC="/graphics/spacer.gif" WIDTH="35" HEIGHT="1" ALT=""></TD>
> <TD>
>
> <TABLE WIDTH="100%" BORDER=0><TR VALIGN="top">
> <TD><A HREF="/"><IMG SRC="/graphics/nlogo.gif" ALT="[MSOE Homepage]" WIDTH=112 HEIGHT=124 BORDER=0></A></TD>
> <TD VALIGN=MIDDLE ALIGN=CENTER><FONT FACE="Arial, Helvetica, sans serif" COLOR="#CC0000">
> <H1>Logout</H1></FONT>
> </TD>
> <TD ALIGN="right">
> <?PHP include("vertTextNavBar.inc") ?>
> <P>
> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="-2" COLOR="#CC0000">
> <?PHP
> $menu = new TRIOWebMenu();
> $menu->show();
> ?>
> </FONT>
> </TD>
> </TR></TABLE>
> <!-- End page header -->
>
> <FONT FACE="Arial, Helvetica, sans serif">
>
> <P>
> <!-- The body of your page goes here -->
>
> You have been logged in as <b><?php print $auth->auth["uname"] ?></b> with
> <b><?php print $auth->auth["perm"] ?></b> permissions.
> <P>Your authentication
> was valid until <b><?php print date("d. M. Y, H:i:s", $auth->auth["exp"])
> ?></b>.
> <p>
> You are now logged out. Thank you for using the TRIO Web Management System.
>
> <!-- leave everything alone below here -->
> <P><HR WIDTH="65%"><P>
>
> <DIV ALIGN="right"><I><font size="-1" FACE="arial, helvetica, sans serif">
> Last Update <?PHP include("last_modified.php3") ?>
> <BR>&copy; 2000 Milwaukee School of Engineering
> </font></I></DIV>
>
> </FONT></TD></TR></TABLE>
> </BODY>
> </HTML>
> <?PHP
> $auth->logout();
> page_close();
> ?>
>
> Dan
> ----------------------------------------------------------------------------
> Daniel E. Baumann
> E-mail: baumannd <email protected> (preferred)
> baumannd <email protected>
> baumannd <email protected>
> baumannd <email protected> (caution: dynamic DNS)
>
> Web location: http://www.msoe.edu/~baumannd
> http://www.linuxfreak.com/~baumannd
>
> "Life would be so much easier if we could just look at the source code."
>
> -- Dave Olson
> ---------------------------------------------------------------------------

Nevermind, I think it is a caching issue beacuse if I hit reload then I see
the correct messages. Does this behavior have to do with the cache fixes for
IE (I am not using IE of course beacuse this is a Linux box). How do I turn
caching off, can I turn it off? I guess I'll give it a look.

Thanks again,

Dan
----------------------------------------------------------------------------
Daniel E. Baumann
E-mail: baumannd <email protected> (preferred)
        baumannd <email protected>
        baumannd <email protected>
        baumannd <email protected> (caution: dynamic DNS)

Web location: http://www.msoe.edu/~baumannd
                http://www.linuxfreak.com/~baumannd

"Life would be so much easier if we could just look at the source code."

      -- Dave Olson
---------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>