Re: [PHP] session/login issue
Check the before/after php.ini settings. My first guess is they finally turned register_globals OFF and the Plesk code is relying on register_globals. Upgrade, fix, or abandon Plesk if that's the case. My second guess is they changed the session.auto_start or completely messed up the session GC or time limit settings in php.ini Actually, if it broke yesterday... The DST date/time change may also mean that the OS idea of now and the PHP idea of now may be out of whack, or, more likely, their server clock is so screwed up that sessions are expired as soon as they are issued. Can we just abandon this stupid DST thing already? Who actually *LIKES* it? If you've got a problem with the amount of daylight you are getting, just get up earlier or later or whatever, and leave the damn clocks alone! On Tue, March 13, 2007 9:11 am, Gunter Sammet wrote: Hi all: I inherited an application using PHP 5.1.4 with MySQL 4.1.20, Apache/2.0.46 (Red Hat) on a VPS server with Plesk 7.5. The authentication used to work just fine till yesterday. Now it doesn't authenticate anymore. My debugging so far hasn't revelaed much. It seems like the sessions are not started or started and destroyed right away again. Session handling is done via session class with session data stored in the database. The database doesn't contain any data but debugging revealed that session data is written to the DB and then immediately deleted. None application of the code has changed. Haven't had a chance yet to find out if the hosting company changed/updated anything. I suspect it has something to do with the environment but at the moment I am spinning wheels. Any pointers would be appreciated! Thanks, Gunter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session/login issue
Hi all: I inherited an application using PHP 5.1.4 with MySQL 4.1.20, Apache/2.0.46 (Red Hat) on a VPS server with Plesk 7.5. The authentication used to work just fine till yesterday. Now it doesn't authenticate anymore. My debugging so far hasn't revelaed much. It seems like the sessions are not started or started and destroyed right away again. Session handling is done via session class with session data stored in the database. The database doesn't contain any data but debugging revealed that session data is written to the DB and then immediately deleted. None application of the code has changed. Haven't had a chance yet to find out if the hosting company changed/updated anything. I suspect it has something to do with the environment but at the moment I am spinning wheels. Any pointers would be appreciated! Thanks, Gunter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session Login
Hi guys Im trying to build a login system with a diferential for na administration login and a partner, where a partner would have certain editing rights and the administrator would have editing rights for all the articles, but Im having problems with sessions, and Id like to know where could I get a good example of login with session MySql based. Rodrigo de Oliveira Costa http://www.ieg.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session Login and Redirect Problem
Issue resolved... For some reason if the $request_uri was empty, the redirect failed because it was going to itself. I enclosed the redirect around an if statement checking the request_uri variable. BTW, $request_uri is a hidden form variable that captures the actual $REQUEST_URI global variable when the login form appears. This allows me to redirect the user to the requested page when they log in. Works like a charm!!! Sometimes in explaining the problem, I see the solution. - Original Message - From: Dennis Moore To: [EMAIL PROTECTED] Sent: Monday, May 13, 2002 5:29 PM Subject: [PHP] Session Login and Redirect Problem I am using Sessions with mod PHP4.0.6 with trans-sid set on. Everything works fine. However, after loggin in, I want to automatically redirect the user to a specific page if they came from an external site or were given a link via emal. I realize that a session variable is not actually stored until the end of the script. So I used the session_write_close() function to save the session before redirecting using the header() function. It does not work. The session variable fail to be available after redirection. Any ideas? ?php if (!session_is_registered(valid_user) $session_login==proc){ if ($userid $password) { // if the user has just tried to log in $query = select * from auth_users .where auth_username='$userid' . and auth_password='$password' and active='Y'; $result = mysql_query($query) or die(MySQL Login Error: . mysql_error() ); if (mysql_num_rows($result) 0 ) { // if they are in the database register the user id $valid_user = $userid; $valid_group=mysql_result($result,0,auth_group); $valid_perms=mysql_result($result,0,auth_perms); $valid_auth_id=mysql_result($result,0,auth_id); session_register(valid_user); session_register(valid_group); session_register(valid_perms); session_register(valid_auth_id); /* Redirect browser */ session_write_close(); header(Location: http://.$SERVER_NAME.$request_uri); exit; // exit script } else { $invalid_login= Invalid login: Could not log you in... !--ERROR: $dbname P $query--; } } } ? -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php