php - Too many redirect -
i have php script ( phpfanlist ) admin section refused work 1 day. guess came php update or something. didn't mind @ time it's bugging me big time.
i made research, checked log , ( there depreciate =& new in front.inc.php corrected it, that's fine ) login page still redirect blank page after successful login. if login not successful, throws error message. if manually try enter admin section ( admin.php ) after login-in, admin without problem.
i checked log , don't message, @ all. how can make login page work ? want enter admin without typing manually ... code old ?
so, login.php
gives form enter login/pass
- successful login : reload
login.php
blank page oflogin.php
- unsuccessful login : reload
login.php
unsuccessful message - what it's suppose on successful login : open
admin.php
this login.php :
require_once('includes/front.inc.php'); $passok = true; if (isset($_post['user']) && isset($_post['pass']) && (strcasecmp($_post['user'], $fanlisting->settings['admin_name']) == 0) && (strcmp($_post['pass'], $fanlisting->settings['admin_pass']) == 0)) { session_start(); header("cache-control: private"); // ie fix!!! $_session['loggedin'] = 1; if (!isset($fanlisting->settings['cookie_lifetime'])) { $fanlisting->settings['cookie_lifetime'] = 60; } if (isset($_post['rememberme']) && ($_post['rememberme'] == 'yes')) { setcookie('phpfanlist_rememberme', 'yesplease', time()+60*60*24*$fanlisting->settings['cookie_lifetime'], '/'); setcookie('phpfanlist_username', $_post['user'], time()+60*60*24*$fanlisting->settings['cookie_lifetime'], '/'); } else { setcookie('phpfanlist_rememberme', false, time()+60*60*24*$fanlisting->settings['cookie_lifetime'], '/'); setcookie('phpfanlist_username', false, time()+60*60*24*$fanlisting->settings['cookie_lifetime'], '/'); } if (isset($_session['previous_url'])) { $url = $_session['previous_url']; unset($_session['previous_url']); } else { $url = 'admin.php'; } header('location: ' . $url); exit; } else { (isset($_post['pass'])) ? $passok = false : $passok = true; }
edit : so, looks there's many redirect admin.php looking @ admin.php doesn't seem give info
// password protect \\ session_start(); header("cache-control: private"); // ie fix!!! if (isset($_get['action']) && ($_get['action'] == 'logout')) { $_session = array(); } if ((!isset($_session['loggedin'])) || ($_session['loggedin'] != 1)) { header('location:admin.php'); exit; } /***********************/ require_once('includes/inc.php'); require_once(realpath(phpfanlist_includes . 'admin.inc.php'));
header of admin.inc.php asking
require_once('./includes/inc.php'); // actions require_once('admin.scripts.inc.php'); $fanlisting->lastchecked();
Comments
Post a Comment