Auth and CGI PHP installations

From: Date: Tue, 19 Feb 2002 10:33:40 +0000
Subject: Auth and CGI PHP installations
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-875@lists.php.net to get a copy of this message
Does Auth not work with PHP in CGI mode? I'm having some odd problems with an application that was working perfectly when I built it on a mod_php-based server, but when I transferred it users are being forced to log in on every page, sessions don't seem to be recognised. I confess I've never had to develop for a CGI PHP installation (having always had mod_php systems to work with) but I'm stuck with it now and need to get the job done. Any suggestions appreciated. A sample usage: <?php require_once "Auth/Auth.php"; // ...snip... function loginform( $user, $status ) { // ... } $a = new Auth( "DB", $dsn, "loginform" ); $a->start(); if( $HTTP_GET_VARS[ 'action' ] == 'logout' ) { $a->logout(); } if( $a->getAuth() ) { // ...content... } ?> The DSN is valid, and the user is always shown the correct page after logging in - but the session does not persist on moving to another similarly protected page. -- Cheers, Rich.

« previous php.pear.general (#875) next »