OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Admin Login Username and Password
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > General Support
echomikedelta
I recently installed Admin authentication for ms 2.2
I put everything where it properly goes and whenever I try to log in it goes no where. I enter my username and password, press the submit button, and it just erases my user/password like I am entering the wrong user id and password. Can anyone help me please?
WhiteBlade
wich contribution did you use exactly ??

Did you made any change in your table of sql ??
echomikedelta
I used the following contribution:

Admin Authentication for 2.2

Admin Authentication for 2.2-CVS

I didnt make any changes to anything except following the directions which are:



QUOTE
Quick Setup of Admin Authentication.

// Open /admin/includes/application_top.php add the following code in
// include authentication user/password of administration
  require(DIR_WS_INCLUDES . 'authen.php');

// Open /admin/includes/configure.php and add the following code in
// define admin user/password
  define('ADMIN_USERNAME', 'admin'); <-- I changed this to my user name
  define('ADMIN_PASSWORD', 'mypasword'); <-- I changed this to my password


// Save the following PHP codes as authen.php in /admin/includes/authen.php
<?php

if(!isset($PHP_AUTH_USER))
{ header('WWW-Authenticate: Basic realm="' . TITLE . '"');
header('HTTP/1.0 401 Unauthorized');
echo $SERVER_NAME . ' Authorization Required.';
exit;
}
else
{ if (($PHP_AUTH_USER != ADMIN_USERNAME) || ($PHP_AUTH_PW != ADMIN_PASSWORD))
{ header('WWW-Authenticate: Basic realm="' . TITLE. '"');
  header('HTTP/1.0 401 Unauthorized');
  echo $SERVER_NAME . ' Authorization Required.';
  exit;
}
}

?>


That is exactly what i did. I didnt change anything. The problem is it brings up the login console, but when I type in my user name and password and submit it the login screen stays up and becomes blank. Like I am using the wrong password and it wants me to try logging in again. If there is some other change in another file i was supposed to make, i have no idea what it is. Please help me
Mibble
you need to put that back to what it was, and also install the sql file which comes with the contribution. most likely, it is pulling that info from the database and passing it along to the program. did the instructions say to change those lines?
echomikedelta
That is the entire contribution, everything that was included, it was just what you see there. So I did it. I have no idea about sql files and such.
Mibble
ok well it has nothing to do with sql files. it is an htaccess file, so if you go to your site via ftp and download the .htaccess file and you can open it and see what the username is, then you may remember the password.
or talk with your host and have them help you reset your .htaccess file.
echomikedelta
where do i get the htaccess file from, there looks to be several in different places
user99999999
Hi,

I think you should remove that and go look in your webhost controll panel for password protected directories

Ask your host how to do it.

Your hard coded password in DIR_WS_INCLUDES then your just beggin to get hacked.

CODE
require(DIR_WS_INCLUDES . 'authen.php');

// Open /admin/includes/configure.php and add the following code in
// define admin user/password
 define('ADMIN_USERNAME', 'admin'); <-- I changed this to my user name
 define('ADMIN_PASSWORD', 'mypasword'); <-- I changed this to my password



This must be some last ditch effort for some web host that didnt allow password protected directories, windows comes to mind.
echomikedelta
do you think my host should be able to password protect the file for me?
HelleM
I have the exact same problem??
I compared the online .htaccess file with the original .htaccess file - and no changes has been made. So I guess the problem is not there...

DOES anybody have the solution to this.
If not - should the "Admin authentication for ms 2.2" not be removed from the download area.
I see tons of unanswered questions about this download - and unfotunately no answers

Helle :-(
cruz.dre
hey guys i forgot my password for my admin and want to use the page you'll quoted to re-access it. So can you'll please tell me what pageyou'll keep referring to where
// Open /admin/includes/configure.php and add the following code in
// define admin user/password
define('ADMIN_USERNAME', 'admin'); <-- I changed this to my user name
define('ADMIN_PASSWORD', 'mypasword'); <-- I changed this to my password


is

thanks so much smile.gif
taonoel
hey i don't know what yall are saying, but my screen also resets the fields when i try to login to admin, its been 3 days since installation, I havent even seen the back office!
e-mems.com
QUOTE (cruz.dre @ Oct 25 2007, 09:26 PM) *
hey guys i forgot my password for my admin and want to use the page you'll quoted to re-access it. So can you'll please tell me what pageyou'll keep referring to where
// Open /admin/includes/configure.php and add the following code in
// define admin user/password
define('ADMIN_USERNAME', 'admin'); <-- I changed this to my user name
define('ADMIN_PASSWORD', 'mypasword'); <-- I changed this to my password
is

thanks so much smile.gif


I'm trying to change the admin password for a new clients site, so I'm a little new to this. But I changed the password exactly like above and now when I try go to www.webaddress.com/oscommerce/admin I get this message:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'webaddress01@web50.pearlriver.easycgi.com' (Using password: YES) in c:\websites\webaddress100\webaddress.com\oscommerce\admin\includes\functions\database.php on line 19
Unable to connect to database server!

How can I fix this?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.