dtoft3 Posted February 11, 2004 Share Posted February 11, 2004 Hi I hat just installed this "Admin Login" Constribution to protect my admin directory. I fill in the username and password and push "Submit".......then I got this error. What Can I Do?.... I Would priciate a answer. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /*******/****/****/httpd.www/catalog/admin/adminProcesslogin.php on line 13 Warning: Cannot add header information - headers already sent by (output started at /*******/****/****/httpd.www/catalog/admin/adminProcesslogin.php:13) in /*******/****/****/httpd.www/catalog/admin/adminProcesslogin.php on line 22 Quote Link to comment Share on other sites More sharing options...
Percept Posted February 11, 2004 Share Posted February 11, 2004 I'm getting the same errors and I don't know what's causing them either. Quote Link to comment Share on other sites More sharing options...
241 Posted February 11, 2004 Share Posted February 11, 2004 Warning: Cannot add header information - headers already sent by (output started at /*******/****/****/httpd.www/catalog/admin/adminProcesslogin.php:13) this is usually a sign of whitespace in the file. download the file catalog/admin/adminProcesslogin.php in order to edit it offline as the online file manager can cause errors when being used to edit files. with the file downloaded and open for edit place your curser after the last ?> and hit delete several times in order to remove the whitespace or blank line, then save and upload. Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
dtoft3 Posted February 11, 2004 Author Share Posted February 11, 2004 Thx 241! But it still won't work... adminProcesslogin.php is looking like this <?phpsession_start (); // include server parameters require('includes/configure.php'); // Open MySQL Connection $Connection=mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD); // Run The Query Without a Limit to get Total result $SQL="SELECT * FROM Admin WHERE Login = '".strtolower($Login)."' and Password = '".$Password."'"; $SQL_Result=mysql_db_query(DB_DATABASE, $SQL); $SQL_Rows=mysql_num_rows($SQL_Result); // Use $HTTP_SESSION_VARS with PHP 4.0.6 or less if ($SQL_Rows > 0) { $_SESSION['IsAdminLoggedIn'] = 1; header("Location: configuration.php"); } else { $_SESSION['IsAdminLoggedIn'] = 0; header("Location: adminLogin.php?ALE=1"); } ?> :( Quote Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2004 Share Posted February 13, 2004 (edited) yes, same error here. I tried both or the contribution versions posted. One needs the config file set to the database details, the othere doesn't I gathered. Is there another way to have a login for admin. Seems VerY scary not having one!!! Best wishes to ALL mark lamb Edited February 13, 2004 by mlamb Quote Link to comment Share on other sites More sharing options...
malabarka Posted February 26, 2004 Share Posted February 26, 2004 Try to change in adminProcesslogin.php in: $SQL="SELECT * FROM Admin WHERE Login = '".strtolower($Login)."' and Password = '".$Password."'"; from Admin to admin (small a!) (or in the admin.sql should be changed to Admin prior dump!) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2004 Share Posted February 27, 2004 Great of you to point that out malabarka...... I'll give it a try... in a few days as it's crazy right now.. best wishes to ALL Quote Link to comment Share on other sites More sharing options...
Guest Posted March 31, 2004 Share Posted March 31, 2004 Try to change in adminProcesslogin.php in: $SQL="SELECT * FROM Admin WHERE Login = '".strtolower($Login)."' and Password = '".$Password."'"; from Admin to admin (small a!) (or in the admin.sql should be changed to Admin prior dump!) That did the trick! Thanks B) 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.