NoobSauce Posted February 18, 2009 Share Posted February 18, 2009 I am working with PHP and SQL for the first time, implementing Free Realty 3.0 for a client. It seems to be working properly, as I've logged from several different ISPs here in Colorado, but my client in Kansas can't login, using the same user/pass that I am. This doesn't make sense to me, but I am a total novice. Anyone have any suggestions on what might cause this? Thanks for your time. Quote Link to comment Share on other sites More sharing options...
revraz Posted February 19, 2009 Share Posted February 19, 2009 Hard to say without seeing any code or without you giving us any error messages. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted February 19, 2009 Share Posted February 19, 2009 It maybe a tornado and your client is in Oz! What is Free Realty 3.0? What are the errors if any? Do you know if cookies are required to login? Has your client blocked cookies? Post the source code for the login script! Quote Link to comment Share on other sites More sharing options...
NoobSauce Posted February 19, 2009 Author Share Posted February 19, 2009 Thanks to you both, for taking the time to answer. Hopefully this will clarify my issue. Free Realty 3.0 is a real estate application that displays property listings. It should allow multiple agents to add and modify content, including specs and pictures. There is no error message associated with the login failure. When the users in Kansas attempt to login, the correct page is displayed, but any further action redirects the user back to the login screen. (This error only seems to occur on the computers that are physically located in KS - despite the fact that they are using 3 different ISPs, whereas the app has, so far, functioned correctly when tested on 4 different computer/ISP combinations in the Denver area. It doesn't seem like the physical location would matter much - but these are the symptoms I'm experiencing.) Cookies are enabled on all browsers involved. I'm not sure if they are required by Free Realty 3.0. Source Code from Login.php: <?php // $Id: login.php,v 2.14 2007/10/23 13:09:28 pat Exp $ /**\file *\brief Allows checking of login information * * Used to verify credentials for most files in the admin * directory. */ $login = new login(); if (isset($_POST['admin_user'])&& isset($_POST['admin_password'])) { $login->user_authorization($_POST['admin_user'], $_POST['admin_password'], 'admin'); } else { $login->login_form('admin'); } /* if ((isset($current_user) && !isset($_SESSION['current_user']))&& (isset($current_level) && !isset($_SESSION['current_level']))) { $_SESSION["current_user"] = $current_user; $_SESSION["current_level"] = $current_level; } if (config_options('hide_user') == 'y') { $user_entry = 'password'; } else { $user_entry = 'text'; } if (config_options('hide_pw') == 'y') { $pw_entry = 'password'; } else { $pw_entry = 'text'; } if (isset ($_SESSION)) { $a = $_SESSION; foreach ($a as $key=>$value) { $$key = $value; } } if (isset ($_POST['admin_user'])) { $admin_user = $_POST['admin_user']; $admin_password = $_POST['admin_password']; $_SESSION['admin_user'] = $admin_user; $_SESSION['admin_password'] = $admin_password; } if (!isset($current_level) || $current_level =="") { if ((!isset($admin_user) || $admin_user != $openadmin) || (!isset($admin_password) || $admin_password != $openpassword)) { // echo "Failed admin user test"; // echo "<br />Using: user $admin_user password $admin_password"; if (isset($auth_user)) { $check = count($auth_user); if ($check >0) { // echo "<br />Check variable = $check"; for ($i=0; $i <$check; $i++) { if ((isset ($_SESSION['admin_user']) && $_SESSION['admin_user'] == $auth_user[$i]) && (isset($_SESSION['admin_password']) && $_SESSION['admin_password'] == $auth_pw[$i]) && $auth_user[$i] != "" && $auth_pw[$i] != "") { $_SESSION['current_user'] = $auth_user[$i]; $_SESSION['current_level'] = "2"; // echo "<br />Current user = $current_user"; return; } } } } $page = $_SERVER['PHP_SELF']; print "<P><form action=\"$page\" method=\"post\">Please enter your user name and password:<P>"; print "Login Name: <input type=$user_entry name=admin_user><P> "; print "Password: <input type=$pw_entry name=admin_password><P><input type=submit value=\"Log In\"></form><P>"; // $current_user = ""; die(); } elseif ($admin_user == $openadmin && $admin_password == $openpassword) { $_SESSION['current_user'] = $admin_user; $_SESSION['current_level'] = "1"; // echo "<br />Passed admin_user and admin_password test"; // echo "<br />\$admin_user = $admin_user"; return; } else { print "<P><form action=\"./admin.php\" method=\"post\">Please enter your user name and password:<P>"; print "Login Name: <input type=$user_entry name=admin_user><P> "; print "Password: <input type=$pw_entry name=admin_password><P><input type=submit value=\"Log In\"></form><P>"; } } */ ?> Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted February 20, 2009 Share Posted February 20, 2009 post the login class $login = new login(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.