nowfrustrated Posted May 5, 2011 Share Posted May 5, 2011 I'm running the latest release of oscommerce. I set up oscommerce in a folder in a pre-existing site for employees to purchase company branded merchandise. Everything was fine until the client told me he wanted the shopping portion of the site password protected, so the public can't look at the items. Simple enough- I went to CPanel and set the password for the folder. Now, I cannot log in to administer the site :( I removed the folder's password protection but the damage is done. I went into phpmyadmin and emptied (truncated) the administrator item. When I returned to the admin section I got the prompt "No administrators, create a new one..." so I created a new user/pass - but even that account can't login. I get the same "Invalid administrator login attempt" HELP! Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2011 Share Posted May 5, 2011 Mark, When you use your hosting accounts password protection feature, it creates an .htaccess file for the directory and an associated .pwsrd file (that filename could be anything) You must delete both in order to regain access to the site. Chris Link to comment Share on other sites More sharing options...
nowfrustrated Posted May 5, 2011 Author Share Posted May 5, 2011 Mark, When you use your hosting accounts password protection feature, it creates an .htaccess file for the directory and an associated .pwsrd file (that filename could be anything) You must delete both in order to regain access to the site. Chris Thanks for the fast reply. That is what I thought, but I was afraid to delete that file. I have no idea where the .pswrd file is... have to start hunting I guess will report back.. Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2011 Share Posted May 5, 2011 Mark, If you check the .htaccess file, it will tell you what the password file is named as it prints the path to the file in there. Chris Link to comment Share on other sites More sharing options...
nowfrustrated Posted May 5, 2011 Author Share Posted May 5, 2011 Found both... got rid of both. .htaccess came back? Deleted it again. Looks like it's gone. Still no luck. Just noticed that in the administrator table in sql it still shows '0' records- the user I create when prompted is not making it into the db. Link to comment Share on other sites More sharing options...
nowfrustrated Posted May 5, 2011 Author Share Posted May 5, 2011 Wait- now it's adding the record, but still can't login! AAAAARRRRGGGH! There's no .htaccess file in my admin dir- just a blank .htpasswd_oscommerce file. Is that correct? Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2011 Share Posted May 5, 2011 Mark, v2.3.1 has a default .htaccess and password file for admin. The password file is empty, unless you create an .htaccess password from the admin area. On the catalog side, there should be an .htaccess file in the store root, however there isn't a password file by default. If you still have the directory protection enabled in your hosting control panel, then it WILL re-create the .htaccess and pswrd files even if you delete them manually. You may need to reset them from your hosting control panel......AND check to see if the hosting control panel password also password protects the sub-directories, if it does that means it is also over-riding the default admin .htaccess and .pwsrd files. Chris Link to comment Share on other sites More sharing options...
nowfrustrated Posted May 5, 2011 Author Share Posted May 5, 2011 GOT IT! I think there's something buggy with the login screen you get after the "no administrator prompt", and apparently my browser was caching that page. Cleared temp files, closed browser, reopened, punched in the URL and bingo. Thanks for your help Chris! Link to comment Share on other sites More sharing options...
nowfrustrated Posted May 5, 2011 Author Share Posted May 5, 2011 Mark, v2.3.1 has a default .htaccess and password file for admin. The password file is empty, unless you create an .htaccess password from the admin area. On the catalog side, there should be an .htaccess file in the store root, however there isn't a password file by default. If you still have the directory protection enabled in your hosting control panel, then it WILL re-create the .htaccess and pswrd files even if you delete them manually. You may need to reset them from your hosting control panel......AND check to see if the hosting control panel password also password protects the sub-directories, if it does that means it is also over-riding the default admin .htaccess and .pwsrd files. Chris I think I'll password protect the folder by different means ;) Not gonna risk screwing it up again. This is not a real high security thing so I think a simple javascript password will be adequate. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.