Jump to content

Admin Login Loop


Recommended Posts

Hi all, first post here

Excitedly downloaded and installed PS - al seemed fine, but i cant login as admin.

If i enter the correct password + username, all it does is send me back to the login screen - no error messages, just please enter your password again.

If i enter the wrong password i do get an error, so it obviously knows when i'm using the right credentials, but somethings wrong.

I' really apprecite any help.

Thanks,

MattC

Edit: i've just realised there doenst seem to be a 0.9.7 forum? but thats the version i'm using.
Edit2: Ok, i've tried it with the newer rc3 version but i have the same problem

  • Like 1
Link to comment
Share on other sites

Hi Phillipe,

I've used IE and FF to check it, both on several machines- both with the same results.

I don't know the server version. Its Godaddy's shared linux hosting
i have a php info file at http://itwiz.co.uk/info.php

hope this helps you
NB: despite turning register globals ON, it still says its off at PS installation. It only says its reccomended so im not sure if this could be it?

Link to comment
Share on other sites

I encountered this problem myself on a windows server recently. I edited the /myPrestashopDir/adminDir/login.php and changed line 105 from

Tools::redirect($url, '');


to

echo "You have been logged in.";


and it worked perfectly. The problem, however, persists in other areas. This fix, however, will get you into the back end.

Using this fix, your login method would be as follows:
1.) Go to http://yoursite.com/adminDir/
2.) Type in login information, hit [enter]
3.) Once you get the "You have been logged in" message, repeat step 1 and you will gain access to the back office.

Link to comment
Share on other sites

I have the same issue using the backend screen. The above suggestion did not work for me.

Install went well on PHP5 and MySQL 5 under Linux. Hosted on GoDaddy.com.
Admin directory name changed, Install directory removed as well.

I am not able to login from the backend. Screen just refreshes, though credentials are correct.

Any suggestions?

TD

Link to comment
Share on other sites

I am using domain name like http://www.mypage.com/prestashop

Here is the cookie info, I do not know what to look for.

aa012319bcf51da70fda236cb09baced
=bZPevg/1PFY=Xa5zn+AFDpU=QIu2qhYvf0U=T8fW+xboBkg=Flnl+Q4R8JY=tKNN89Ocsqo=Y4hz5OlG/QQ=PqJSNHRYLQs=;
expires=Thu, 26-Jun-2008 16:50:43 GMT; path=/prestashop/admin423/login.php/prestashop/admin423/; domain=.datonex.com

Link to comment
Share on other sites

Im having the same issue as well. This looks to me that this has been a on going problem since day one when Presta was released to the public (from searching the forum). Im to as well using godaddy as my hosting provider. The issue seems to be issolated to godaddy users now. Is there any updates to this issue?

Link to comment
Share on other sites

****ISSUE RESOLVED*****


Okay after looking over this issue several times and scratching my head pondering what could be causing this issue I had put my trade skills to work (I'm a Internet Tech Support agent for Comcast, tech support is my life) I have concluded the following

1. Almost every one that is now having this same exact problem is using Godaddy as their hosting provider so it led me to believe its not a coding issue at all.
2. And with the conclusion of #1 I started to compare my local server settings with my Godaddy server settings.
3. With the comparison of the settings I found a BIG discovery. Of course the problem lyes within the PHP settings. I pulled both my local servers and my godaddys php-info and paired them sided to side. At first I thought it wasn't going to be easy because EasyPHP comes with PHP 5.2.0 and godaddys is 5.2.5 so the info looked different but after looking at each individual setting I noticed allot of the settings were different between the two.
4. Since they were different I figured IT HAS TO BE THE PHP SETTINGS. Knowing that with goaddy there is one feature I like allot and that is that you can actually manage your own php.ini file by making one your self and putting in the root directory of your site and it will over-ride godaddys global php settings. So I took my local server's php.ini file, renamed it php5.ini and copied it to the root directory of my site just to see if it would fix this problem and ding I have access with no looping or any other errors for that fact.

Now I plan on going through each setting in the ini file to see witch setting it was causing the loop and will post an update in this thread with the setting(s). If any one beets me to it feel free to post them.

Kind Regards
Jason

To save my current php.ini file right click here and "save as".This ini file is currently working fine for me. So if you want to use it godhead and do so.

Link to comment
Share on other sites

For Godaddy Linux Hosting Users:

I was having the same problem to login the back office page (Administration)
I change the php.ini file for a new one with different configuration.
It help me solve the problem. There is nothing wrong with the code at all.
I am using Godaddy Linux hosting with PHP 5.2.5

If you want to try this php.ini file just download the file and upload in to the root directory of your site.

And don’t forget to rename to php5.ini or php4.ini depending of PHP version that you using, is very important.
Good Luck.

http://help.joyent.com/index.php?pg=file&from=2&id=86 This link is for PHP 4.0+

http://help.joyent.com/index.php?pg=file&from=2&id=85 This link is for PHP 5.0+

Link to comment
Share on other sites

For Godaddy Linux Hosting Users:

I was having the same problem to login the back office page (Administration)
I change the php.ini file for a new one with different configuration.
It help me solve the problem. There is nothing wrong with the code at all.
I am using Godaddy Linux hosting with PHP 5.2.5

If you want to try this php.ini file just download the file and upload in to the root directory of your site.

And don’t forget to rename to php5.ini or php4.ini depending of the version that you using, is very important.
Good Luck.

http://help.joyent.com/index.php?pg=file&from=2&id=86 This link is for PHP 4.0+

http://help.joyent.com/index.php?pg=file&from=2&id=85 This link is for PHP 5.0+

Link to comment
Share on other sites

Try turning off (or on) register globals..


Put this code in your .htaccess file (usually located in your root directory)

php_flag register_globals on



If it doesn't work on, try it "off" I don't remember which setting it was that worked but for me this was the issue

You can download one already pre-made by right clicking and click "Save Link As" or "Save Target As" and then uploading it to your root directory. Don’t forget to delete the .txt extension at the end of the file and add the "." at the start.
Unfortunately I have decided to go with ZenCart (no offence PrestaShop Developers, you have a excellent shopping cart system, just at this time doesn't have everything I need) until my next site make over witch more then likely will be when Presta has more mods and FREE and PAID templates. The most liked to see mod would be the Bulk product upload with image name support. That one just blows me out the water, it defeats the whole purpose of the BPU if you have to go add the picture path one by one if your working with 300+ products. And also support for M$Excell/OpenOffice.org Spreadsheet format.

This is what I’ve done using ZenCart since my last post J-Tech N Stuff.com The Site was migrated to the live server yesterday, but is still in catalog mode until the final touches are done.

If you want to check out the admin back side (Very Limited)
Click Here
User Name: demo
Password : demodemo
(This log-in will expire in 2 hours)

For some reason only some of the mods installed are showing up and none of the pre-installed ones are showing on a lock down state permission set.

Link to comment
Share on other sites

thanks for your reply pancho, but I still cannot log. What a pitty. Im sure we will tackle this soon though :)
warm regards.
@jtechnstuff: I dont have the file you posted mate (.htaaccess) searched here and there but isnt anywhere. Thanks for your pointer.

Link to comment
Share on other sites

I had the same problem fater my installation, till I accidently found out why it was happening. For me it was because i was not using the www prefix in my admin address.

For example example.com/admin/ didnt work, but www.example.com/admin/ did work fine.

Link to comment
Share on other sites

  • 2 weeks later...

I think it depends on your URL domain.

.co.uk needs a www. subdomain at the front - a blank will not do.

but a .com can have a blank subdomain name!

Tested on Dreamhost servers with .co.uk and .com on the same file hosting server and same mysql server.

Hope this helps!

-Anthony

Link to comment
Share on other sites

hi there , this problem happens to me too.

i just installed ,configuring things, and make a theme with prestashop 1.0 on my local machine . i'm using XAMPP server and it works fine.

And its time for me to try it on internet server , so i zip all of my local presta files and export my local sql.Then i upload my zip to my dreamhost server, import sql , configure config/settings.inc.php to point mysql at my dreamhost account and change PS_BASE_URI on ps_configuration table .

and everything works fine at front end , but not at back end . I cant login to my back office . after i login with right email/password , i'm always redirected to login page , and it gives no error/warning .

am i missing things ?

Link to comment
Share on other sites

  • 3 weeks later...
I had the same problem fater my installation, till I accidently found out why it was happening. For me it was because i was not using the www prefix in my admin address.

For example example.com/admin/ didnt work, but www.example.com/admin/ did work fine.



i want to kiss and hug you @jhnstcks

i m a stupid i am a stupid!

now everythink working fine ...

just type www first on the adress ...
Link to comment
Share on other sites

  • 3 weeks later...

Hi everyone,

I am very exited to test de V1 version, but I encounter this same issue of loop login...
I read all your posts... Then realized that at the end of the installation process it told me to rename the /admin folder to something else then admin, so I did
But I use @dm1n and there was my error.

I just renamed to adm1n and IT WORKS !!!

;o)

My 2 cents !

Link to comment
Share on other sites

I had the same problem fater my installation, till I accidently found out why it was happening. For me it was because i was not using the www prefix in my admin address.

For example example.com/admin/ didnt work, but www.example.com/admin/ did work fine.


It's worked for me when PS on remote host, but this solution is impossible when on localhost.
Somebody know another solution for localhost with backoffice?
Link to comment
Share on other sites

  • 9 months later...

Hi,

This is really weird... I am having a strange issue with prestashop in Godaddy. after installation the admin part works well but the front end/shop shows nothing but white page... nothing at all. NONE of the front end page are working.


then I modified the index page and commented following line:

//$smarty->assign('HOOK_HOME', Module::hookExec('home'));
//$smarty->display(_PS_THEME_DIR_.'index.tpl');



and added new code, simple php code:

echo ''.'Categories'.'';



when I run I only see "Categories" word in the page.


Please help.


Deepak

Link to comment
Share on other sites

  • 6 months later...

I've isolated a possible root cause for strange redirect behaviour with the prestashop admin.

My environment:
Prestashop 1.2.5
PHP 5.3.1
Regular hosting (no godaddy)

Root cause:
prestashop/admin/init.php line 17:

$destination = substr($_SERVER['REQUEST_URI'], strlen(dirname($_SERVER['SCRIPT_NAME'])) + 1);



How to duplicate
I've set a proxy in firefox and set the proxy URL to your own domain with port 80. So all request will go to your own domein. In that case the REQUEST_URI variable is different!!! And the presta code seems not to anticipate this difference. It could very well be the case that godaddy is forcing it's own proxy or another mechanism with the same effect, namely a differenc REQUEST_URI.

Firefox with proxy:

REQUEST_URI     http://www.abcdomainonline.nl/shop/adminXXXX/info.php
SCRIPT_NAME     /shop/adminXXXX/info.php 



admin tries to redirect to (which is wrong):
http://www.abcdomainonline.nl/shop/adminXXXX/login.php?redirect=mainonline.nl/shop/adminXXXX/

Firefox without proxy:

REQUEST_URI     /shop/adminXXXX/info.php
SCRIPT_NAME     /shop/adminXXXX/info.php 



in this case teh admin properly redirects:
http://www.abcdomainonline.nl/shop/adminXXXX/login.php?redirect=index.php

I found out by adding a test.php file in the adminXXXX folder with this content:

<?php
phpinfo();
?>


And then show the http://www.abcdomainonline.nl/shop/adminXXXX/test.php in both situations.


So the effected source code line in init.php needs a developers review. I don't have the solution provided as I don't need it (I accedently kept the proxy enabled which I use to review websites for which the domein name is not yet active in the DNS).

Good luck and I hope this will contribute to the nice prestashop product!

Link to comment
Share on other sites

  • 6 months later...

I had this problem - I was using a temporary sub folder to set the shop up in 'flowershop'. when I transfered the customers domain to my hosting co, I set the flowershop folder as the root for the new domain. However, in the settings for prestashop, I had set the root folder as /flowershop/ , and it wouldnt let me log in using the new domain.
when I set the root folder to '/' in prestashop preferences (by logging in using the old domain and 'flowershop' as sub folder), it would then let me log in using the full new domain name - flowershop.co.uk.

check you havent got a similar problem

Link to comment
Share on other sites

  • 5 months later...

Hi, I met this problem before and I found out it was server problem but not coding problem.

The problem is my server turn off output_buffering, so it couldn't send the header line and cause jumping back to login page after logging in successfully.

The solution is turning it ON. You can either place a php.ini under the root folder to overwrite the server setting. For this solution, please consult the IT dept of your server.

Hope it help~ ^_^

Link to comment
Share on other sites

  • 2 weeks later...

Hello all,

I have the same problem, installed the latest version of prestashop.1.3.6.0
Did everything what is mentioned above but still cannot login.
This is the url;
http://www.innana.net/shop/admin123/login.php?redirect=index.php

In the installation it was all correct.
I use the right php , did not make any mistakes, renamed the admin... everything
I normally work with joomla and at least the installation is always working, freaks me out!

Is there someone who can take a look for me what is wrong ?
i'm gladly send you by PM all you need :)

Thanks Daniel

Link to comment
Share on other sites

Hello all,

I have the same problem, installed the latest version of prestashop.1.3.6.0
Did everything what is mentioned above but still cannot login.
This is the url;
http://www.innana.net/shop/admin123/login.php?redirect=index.php

In the installation it was all correct.
I use the right php , did not make any mistakes, renamed the admin... everything
I normally work with joomla and at least the installation is always working, freaks me out!

Is there someone who can take a look for me what is wrong ?
i'm gladly send you by PM all you need :)

Thanks Daniel


I am still facing that problem so I had to tinker with some coding given by someone before. It doesn't redirect me that much but it still does but I hope it works for you. I changed mine from 3600 to 1200.

In the file “prestashop/classes/Cookie.php” go down to line 50 where you see:

$this->_expire = isset($expire) ? intval($expire) : (time() + 1728000);
and change it too:

$this->_expire = isset($expire) ? intval($expire) : (time() + 3600);
This is because (some versions of) Internet Explorer seem to reject cookies that have large expiry
Link to comment
Share on other sites

I have found and solved my problem:
I installed the webshop on a sub domain and that was the reason the admin kept looping.
I installed the shop now on the main domain and have no problem.
Just wondering now how i get it function on my subdomain .. that's better in my case :)

greetzzz danielle

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...