Jump to content

[SOLVED] Can't access the back office (after changing shop's directory)


Recommended Posts

Hello everybody,

 

I was developing my shop (1.3.6.0) on my subdomain (modecbaby.sk/obchod).

When the shop was finished and ready, I moved it straight to modecbaby.sk and changed settings.ini.php accordingly.

 

after the move:

- frontoffice is working without any problem, but

- back office is inaccessible - it takes my username&pass, followed by refresh through blank page and back to the login page (password and username are correct, and location of the shop in config/settings.ini.php is correct).

 

- google helped and found a couple of the same issues, but none of the solutions offered work for me - it's not a php bug (php 5), it's not wrong ps_base_uri parameter etc, it's not cookies (I've tried to delete them a couple of times, also tried different browsers)...

 

I'll really appreciate any help, as I'm absolutely helpless at this stage...

 

Thanks a million!

Link to comment
Share on other sites

Mike,

to be honest, I didn't. My fault, I thought it's easier than it looks.

So - I didn't do it exactly as described in the guide, shop wasn't (isn't) in mainenance mode, all other things were done more-less as described in the guide.

Basically, shop went from sub-domain straight to the root, so there is no need to change setup of the database, it should be only the Base URI...but something went wrong there...

(.htaccess wasn't generaged before the move)

 

Peter

Link to comment
Share on other sites

Here we go, I just changed db details...they are correct anyway...

Thank you!

 

<!--?php

 

define('__PS_BASE_URI__', '/');

define('_THEME_NAME_', 'prestashop');

define('_DB_NAME_', 'baby');

define('_DB_SERVER_', 'mysql5.provider.sk');

define('_DB_USER_', 'user_name');

define('_DB_PREFIX_', 'ps_');

define('_DB_PASSWD_', 'password');

define('_DB_TYPE_', 'MySQL');

define('_COOKIE_KEY_', 'NzI0rZ6rXk3swneC7oDBU8n76QANwi4ohPYYXpoTZNj7n88I13HJiy8G');

define('_COOKIE_IV_', 'yQGySJPM');

define('_PS_VERSION_', '1.3.6.0');

 

?-->

 

edit:

php 5.1.54

no ssl

 

not a cookie - related problem (tested):

http://www.vodien.com/support/96/prestashop-auto-log-out-issue.html

or

http://www.prestashop.com/forums/topic/71366-solved-admins-login-redirect-bug/page__p__598151__hl__login__fromsearch__1#entry598151

or

http://prestashopmania.blogspot.com/2012/02/prestashop-troubleshoot-login-page.html

 

not a request_uri / php_self / script_name (php bug) related (tested)

http://www.prestashop.com/forums/topic/122659-solved-i-cant-login-to-the-back-office-it-redirects-to-login-page/

Link to comment
Share on other sites

I hope you edited this post to remove your actual user name, password and provider, If not these entries should have your actual user name and password not 'user_name' and 'password' etc.

Other then that I do not see a problem, have you tried to move back to sub and see if all works.

If you do and it works fine then follow directions provided by Mike and see if all is ok.

 

 

Something else to try would be to delete all browser cache files and clear cache files from tools/ smarty/ cache and themes/ prestashop/ cache could be just a cookie issue.

(Don't delete the Index.php files)

Link to comment
Share on other sites

no worries, I changed them :-)

 

smarty cache is deleted, didn't help. will try to do theme's cache.

 

its really weird, as it won't login to the BO on any pc...

I just hope there is a way how to fix this problem...

 

I just noticed....trying to acces on slower pc&broadband - system after login page shortly (really short moment) displayed page with text (something like) "Click on this link to acces (modify?) your back office".

I couldn't manage to get a screenshot/exact text, but it was there anyway...maybe it helps....

Link to comment
Share on other sites

is there anything else (apart from settings.inc.php) related to the BO and/or authorization linked (fixed) to the location of the shop?

I get an error when I try to login to the FO - error 01 - authorization failed. This probably applies only to my account - I tried to register new customer, registered+logged in-out-back in withou any errors.

Please, help.

 

would there be an easy way to reinstall the shop? (would it fix the issues though?)

p.

Link to comment
Share on other sites

Jonadabe: no, that's not the problem. Site was already moved to the domain (off localhost) and working, but I initially placed it under a subdomain. Then I decided to move it to the root (where it is now), and that's when the problem occured. FO is working fine...as far as I know.

 

Yesterday, I fiddled with settings (admin/login.php - tried to change string "PHP_SELF" in this line:

$cookie = new Cookie('psAdmin', substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__), -10));

for suggested alternatives request_uri or script_name, but none of them worked, so I went back to PHP_SELF. BO wasn't accessible. I turned the pc off.

An hour or two later came back to it, tried to log in - success. Don't know why, don't know how, but I was able to login and work in the bo for the rest of the evening, and so was my mother (I built the shop for her:-)).

Today, I tried to login to the BO again - managed, but when I clicked on any tab, then I was automatically logged out. Logged in again with the same result. This repeated for a couple of times, now it's back where it was - login screen goes to blank and back to login screen.

 

I guess (it's just a shot into darkness) it might be a cookie-related issue, as I don't really know what else it might be.

 

I also searched my database for string "/obchod/" (that's the subdomain where the shop was placed). Found one (related to facebook thing), deleted. I also searched my local back-up for the same and found it in files:

DISKsettings.inc.php

ext_settings.inc.php in ../config/

 

I've also setup the site in google: google.com/webmasters/tools/ but I think this shouldn't have any effect on the site itself...

 

A minute ago, I tried again, this time using Chrome - logged in, but was logged out (without any error) a couple of clicks after. This repeated a couple of times, now I'm not able to login at all...

 

Any other ideas, PLEASE?

Link to comment
Share on other sites

update...still trying to find a solution. I've decided to try solutions on links posted above (except the php bug related).

this seems to be working and solving the problem: http://www.vodien.co...-out-issue.html

all the symptoms for this are right. I just hope that this is it. Will keep this threat open for an update. If a problem won't resurface in a couple of days, I'll close this threat.

 

Anyway, if you come up with any other idea, we can have a look at it. Thanks again for your time!

 

p.

 

edit 20/03/12 - all symptoms are gone, it must've been a problem related to cookies/ip, solution on the link above worked.

 

Will leave this open for a few more theys before closing the treat...just in case.

Link to comment
Share on other sites

  • 2 weeks later...

It seems like a solution described in post no. 11 is the right one.....

I can't find an option to mark this thread as solved, could somebody tell me how to or do it for me, please?

 

I'd like to say THANK YOU to everybody who tried to help me. Thanks.

 

p.

Link to comment
Share on other sites

  • 6 years later...

I am aware that this is an old thread.
I am currently experiencing a challenge, that is very similar this one. The only difference is: I am not reverting back to the login screen of the backoffice, but I get an unformatted version of the backoffice: it looks like a HTML page from 1994, CSS seems not to be working. This results in a total unusable backoffice.
 

Pre-error-situation:
 

I installed Prestashop in my public_html folder which is bound to my root (https://[mydomain.tld]). At that moment, we had still an external webshop which was referred to by a CNAME record. We wanted to setup the new webshop aside the old one, so we created a subdomain shop.[mydomain.tld], and connected to the same database we used for the original Prestashop. We installed a theme, and some addons, and everything was fine. We removed the CNAME record that was used for the external webshop, and had TWO ANAME records pointing to the same server, but with two folders on that server. Since the domain name in Prestashop was set to shop.[mydomain.tld], any attempt to access https://[mydomain.tld] was redirecting to https://shop.[mydomain.tld]. No problem, everything was working fine.

 

Then we wanted to work on some SEO, and according to some theories, it's better not to use a subdomain. So we changed both the SSL and the non-SSL url in Prestashop from shop.[mydomain.tld] to [mydomain.tld], The frontoffice was working perfect, but ... the backoffice was not working. The login screen was fine, but, like I wrote in the intro text: after login we get an unformatted, very old-school-looking website, when accessing the backoffice from https://[mydomain.tld]/admin[randomcharactes]. However, if we access https://shop.[mydomain.tld]/admin[randomcharactes], the backoffice works fine, but gives a warning at the top of the screen about the url not correct.

To be totally sure, I made a backup of the public_html folder, and the shop folder, then I put the contents of the shop folder into the public_html folder.

I cleared the smarty cache, I cleared the browser cache, but still no luck!

So now we are back to the original situation, where the shop is running at https://shop.[mydomain.tld], and that works fine. Only that SEO thing ...

Is there anyone who can help?

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...