Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Logging in via /admin returns user to login page without being logged in

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 2974 Views
  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Logging in via /admin returns user to login page without being logged in Link to this post

    So my problem is if you try to go to /admin and log-in using an administrator credentials or even the default login set via the _config.php file, it returns the user to the login page without logging them in.

    The url says Security/login?BackURL=/admin

    I tried flushing cache, rebuilding database, turning dev mode on, etc. Tried manually visiting the admin by typing it in, but it just keeps returning you to the login page.

    The only thing I changed recently was to add GD::set_default_quality(100); to the _config.php and even removing it doesn't fix the problem.

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    Hmmm, very strange!

    What does it say on the screen? failed login? already logged in? nothing at all?

    "Security/login?BackURL=/admin" --> this simple means that you are redirected back to do a login and when that has worked then you will get directed to admin.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    Yea, when you get bumped back to the login page it doesn't display any error messages or alerts or anything like that.

    I even checked error log files, nothing in them about this.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    Does anybody have any suggestions? I'm still stumped.

    Tried logging in via a direct url but that didn't work either.

    Seems like a cookie or session issue, or something isn't logging me in.

  • wainui
    Avatar
    Community Member
    56 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    You find a fix for this?
    having exactly same problem.. getting redirected back to login.. no errors

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    Not yet, but I'm planning on doing another big push on this issue this week. I'll keep this thread updated of any fixes I find.

  • wainui
    Avatar
    Community Member
    56 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    just thought I would bump this... Any ideas greatly appreciated.
    I have put the site in dev mode .. done a dev/build
    flushed templates etc

    But still cannot login or force login. Any ideas?

  • nimeso
    Avatar
    Community Member
    17 Posts

    Re: Logging in via /admin returns user to login page without being logged in Link to this post

    From memory I did have the same problem, try:

    1. Check your .htaccess file and make sure its all good and doesn't look weird mine looks like this

    ### SILVERSTRIPE START ###
    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from 127.0.0.1
    </Files>

    <Files web.config>
       Order deny,allow
       Deny from all
    </Files>

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /

       RewriteCond %{REQUEST_URI} ^(.*)$
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    </IfModule>
    ### SILVERSTRIPE END ###

    2. Make sure your not trying to login with any previous member session data.
    3. put Security::setDefaultAdmin('admin','admin'); into your config file and try logging in
    4. Remove all your themes included javascript and try that?

    hmmm... I did figure this one. try the above and get back if it doesn't help

    Cheers
    J

    2974 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.