Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin login problem after host changed home directory


DJBenz

Recommended Posts

Posted

My Oscommerce 2.2 RC1 store was running just fine, and I had installed several contributions.

 

Recently my host changed the home directory for my account from:

 

/home70a/sub009/sc40966-VQSK

 

to

 

/home76c/sub009/sc40966-VQSK

 

Internet-wise, my store is at www.mydomain.com/catalog/

 

on their server it is /home76c/sub009/sc40966-VQSK/mydomain.com/catalog

 

Initially, the move caused problems with OSC with the store displaying errors on the frotpage related to sessions.php. The host has managed to fix these. I also edited /catalog/includes/configure.php and /catalog/admin/includes/configure.php to contain the correct home path.

 

However, since the change I can no longer log in to the admin panel. I thought it was just a case of a forgotten password, and followed the instructions here to paste another password into the admin table in phpmyadmin.

 

But it's not a forgotten password. This is what happens:

 

If I use an incorrect password, I get "Error: Invalid administrator login attempt.", so that is working OK.

 

However, if I use the correct password, the screen refreshes and takes me back to the login page and does not let me access the admin panel. No error message is displayed.

 

I was told this is because OSC cannot find the file it is looking for, but I have no idea what to edit to fix this.

 

Do any OSC experts have any ideas of how I might get access to my admin back? The host seems to have exhausted their abilities with it.

 

Thanks in advance,

 

Dan

Posted
My Oscommerce 2.2 RC1 store was running just fine, and I had installed several contributions.

 

Recently my host changed the home directory for my account from:

 

/home70a/sub009/sc40966-VQSK

 

to

 

/home76c/sub009/sc40966-VQSK

 

Internet-wise, my store is at www.mydomain.com/catalog/

 

on their server it is /home76c/sub009/sc40966-VQSK/mydomain.com/catalog

 

Initially, the move caused problems with OSC with the store displaying errors on the frotpage related to sessions.php. The host has managed to fix these. I also edited /catalog/includes/configure.php and /catalog/admin/includes/configure.php to contain the correct home path.

 

However, since the change I can no longer log in to the admin panel. I thought it was just a case of a forgotten password, and followed the instructions here to paste another password into the admin table in phpmyadmin.

 

But it's not a forgotten password. This is what happens:

 

If I use an incorrect password, I get "Error: Invalid administrator login attempt.", so that is working OK.

 

However, if I use the correct password, the screen refreshes and takes me back to the login page and does not let me access the admin panel. No error message is displayed.

 

I was told this is because OSC cannot find the file it is looking for, but I have no idea what to edit to fix this.

 

Do any OSC experts have any ideas of how I might get access to my admin back? The host seems to have exhausted their abilities with it.

 

Thanks in advance,

 

Dan

 

 

I don't know in how big of a rush you are, but if you need it done quickly could you not just backup your database, tar your catalog dir, and reinstall. Seeing as install takes no time whatsoever and restoring sql is quite simple I would go this route, but this is just me.

Posted
I don't know in how big of a rush you are, but if you need it done quickly could you not just backup your database, tar your catalog dir, and reinstall. Seeing as install takes no time whatsoever and restoring sql is quite simple I would go this route, but this is just me.

 

Thanks for the suggestion, but reinstall wouldn't be so simple as I've installed at least half a dozen contribs as well as customizing the look and layout of the store.

 

The host has a 1-click install for OSC so it would be simple if my store was vanilla. But it's not. :(

Posted
Thanks for the suggestion, but reinstall wouldn't be so simple as I've installed at least half a dozen contribs as well as customizing the look and layout of the store.

 

The host has a 1-click install for OSC so it would be simple if my store was vanilla. But it's not. :(

Are you using SSL? If so, have you tried not using it?

Posted
Are you using SSL? If so, have you tried not using it?

 

I only use ssl for the customer registration. Admin login is not secured with ssl.

Posted

I just answered almost the exact question on my blog!

You need to empty the administrators table (use phpmyadmin), then set up a new username/pass in the login page. For some reason, your password isn't working - so you need to reset it. And you can't do that unless you get into your Admin area, or use phpmyadmin.

Posted
I just answered almost the exact question on my blog!

You need to empty the administrators table (use phpmyadmin), then set up a new username/pass in the login page. For some reason, your password isn't working - so you need to reset it. And you can't do that unless you get into your Admin area, or use phpmyadmin.

 

Burt, you could have just saved my life. :thumbsup:

 

However, I have tried pasting a new password into phpmyadmin, and that didn't work. Are you saying that the admin table needs to be completely emptied before this method will work?

Posted
It didn't work. :(

 

But then it's not a forgotten password as I mentioned earlier.

 

Still getting the error on wrong password / refresh on correct password I described above.

 

>_<

 

Then you have much bigger problems.

Did the host do anything else at all whilst moving your site (eg upgrade php, upgrade mysql).

Posted
>_<

 

Then you have much bigger problems.

Did the host do anything else at all whilst moving your site (eg upgrade php, upgrade mysql).

 

God only knows. Everything else works just fine, except admin login. They've gone through everything and supposedly sorted all the issues relating to the move, but they're not OSC experts so they can't help any further. The database is still the same AFAIK, and I can't find any reference to the old home path in the database anyway.

 

The search continues, thanks for your help thus far.

Posted

Dan, if you want to message me (don;t post them publically!) your FTP and host control panel (so I can get to your PHPMYadmin), I'll take a look and see if I can see anything that looks wrong...you can always change the passwords after.

Posted
Dan, if you want to message me (don;t post them publically!) your FTP and host control panel (so I can get to your PHPMYadmin), I'll take a look and see if I can see anything that looks wrong...you can always change the passwords after.

 

Well, thanks to burt's kind help he's now found a workaround for this problem which makes me a very happy chap and very conscious of the value of such a helpful community. Thanks to all who offered help, and especially burt who managed to get things working again. :thumbsup:

Posted
Thanks for your kind words Dan :D

Sharing the description of what was wrong and how it was fixed might help others with the same problem.

Posted
Sharing the description of what was wrong and how it was fixed might help others with the same problem.

 

Burt changed admin login from the standard OSC login page to one using .htaccess.

 

The exact details, I'm unsure of, but it worked. :)

 

EDIT: In burt's own words:

 

I removed the redirect to login if an admin is not logged in. And replaced it with a password created using your host control panel.
  • 4 months later...
Posted
Burt changed admin login from the standard OSC login page to one using .htaccess.

 

The exact details, I'm unsure of, but it worked. :)

 

EDIT: In burt's own words:

 

 

i got struck with the same LOGIN issue !!

 

May i know which file to EDIT ???

 

can any one help me ?

Posted

Yup, i also have come across this problem when i moved my installation earlier today!

 

Can anyone explain this a bit more? Is like a link to some tutorial about moving the install, because i'm not sure i have yet updated all the parameters that need updating with the new path?!

 

i got struck with the same LOGIN issue !!

 

May i know which file to EDIT ???

 

can any one help me ?

Posted

Login points:

1)Is Your admin protected by .htaccess(password protect directory) or

2)database related password.

 

If by 1 You can change password using cpanel password proect directory icon.

 

If point 2 then You need to either remove the rows in db related to login(as on times during site transfer those md5 values get corrupted) or copy row from previously db table and paste here one field at a time for that specific row.

 

Satish Mantri

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted
I removed the redirect to login if an admin is not logged in. And replaced it with a password created using your host control panel

 

 

Can you please tell me how to do this ???

 

how to replaced it with a password created using your host control panel ?

 

waiting for your reply !!

Posted
Login points:

1)Is Your admin protected by .htaccess(password protect directory) or

2)database related password.

 

If by 1 You can change password using cpanel password proect directory icon.

 

If point 2 then You need to either remove the rows in db related to login(as on times during site transfer those md5 values get corrupted) or copy row from previously db table and paste here one field at a time for that specific row.

 

Satish Mantri

 

1)Is Your admin protected by .htaccess(password protect directory) or

 

No,I dont have .htaccess(password protect directory)

 

 

when i enter the wrong password its says "Invalid password" but when i enter the correct admin password i get back to the login page. how do i solve this ? i could not trace any error !!

 

Please help me !

Posted

If You fill the right password and Yuo are back t login page then the reason can be:

1)The code uses access level admin login control.So the file lsit that should be in the db table for the admin You are logged in is not there.

Or admin login group id is not stored in session.

2)The session Id is getting lost.

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

  • 2 months later...
Posted

Hi guys.

 

I know this is an old thread, but someone might find this useful.

 

I had a similar problem, though for different reasons. This thread pointed me in the right direction but I still had to do some digging.

 

To remove the redirect to login, got to catalog/admin/includes/application_top.php and comment out the block of code below the comment that says:

 

// redirect to login page if administrator is not yet logged in

 

 

Obviously, make damn sure you have the directory protected by .htaccess before doing this!!!

 

 

hope that helps someone.

 

Dan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...