golpemortal Posted March 4, 2007 Posted March 4, 2007 first time setting this pappy on a Linux base Fedora core!!! ..... I'm testing oscommerce-3.0a3 and eveything works ok on the install but I can't log in into the admin.... I haven't done nothing with .htaccess file or I have change nothing on my httpd.conf of my apache config file is there something I could do to gain access to admin?
djmonkey1 Posted March 4, 2007 Posted March 4, 2007 Yes- I'm taking it you've lost/forgotten your admin password and now want to get back in to admin. First, login to your database via phpMyAdmin or whatever interface you use. Go to the osc_administrators table and delete whatever is in the user_password field for your admin user. Next open up admin/login.php and change if (!empty($_POST['user_name']) && !empty($_POST['user_password'])) { $Qadmin = $osC_Database->query('select user_name, user_password from :table_administrators where user_name = :user_name'); $Qadmin->bindTable(':table_administrators', TABLE_ADMINISTRATORS); $Qadmin->bindValue(':user_name', $_POST['user_name']); $Qadmin->execute(); if ($Qadmin->numberOfRows()) { if (osc_validate_password($_POST['user_password'], $Qadmin->value('user_password'))) { $_SESSION['admin'] = $Qadmin->value('user_name'); osc_redirect(osc_href_link_admin(FILENAME_DEFAULT)); } } } to if (!empty($_POST['user_name'])) { $Qadmin = $osC_Database->query('select user_name, user_password from :table_administrators where user_name = :user_name'); $Qadmin->bindTable(':table_administrators', TABLE_ADMINISTRATORS); $Qadmin->bindValue(':user_name', $_POST['user_name']); $Qadmin->execute(); if ($Qadmin->numberOfRows()) { $_SESSION['admin'] = $Qadmin->value('user_name'); osc_redirect(osc_href_link_admin(FILENAME_DEFAULT)); } } Upload the changed login.php and you should now be able to login to your admin using only your username and a blank password. Once logged in you can enter a new password at Configuration->Administrators, then restore your admin/login.php file back to the way it was. Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.