Jump to:

23460 Posts in 18907 Topics by 2877 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: 3039 Views
  • wainui
    Avatar
    Community Member
    56 Posts

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

    Hey guys... thanks for the reply.
    Just figured out the problem..

    I had Director::setBaseURL('http://www.mysite.co.nz/');
    in my _config - I removed that and all go

    Mike

  • 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

    My .htaccess file is pretty normal almost exactly identical to what you guys posted. See below:

    ### 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 /
       
       # Site Maintenance Redirect
       #RewriteCond %{REQUEST_URI} !/maintenance.html$
       #RewriteCond %{REMOTE_HOST} !^98\.155\.171\.63
       #RewriteRule $ /maintenance.html [R=302,L]

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

    So obviously it's not the problem.

    Saw what wainui said about having the BaseURL set in config.php, but I don't have that set in mine, so that's not the problem either.

    I just wiped all the SilverStripe files and reinstalled them, with the latest version 2.4.3 (was on 2.4.1 before), but that didn't change anything at all.

    I'm beginning to consider hiring one of the SilverStripe dev team members to fix this bloody issue. Aaron, are you interested?

  • briley
    Avatar
    Community Member
    7 Posts

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

    I'm having this same issue. A client is able to login to the admin successfully but is having all kinds of problems in the admin section, but I'm not able to get past the login screen. Even when I put in bogus login data it simply reloads the login page without any message. Let me know if you come up with a solution.

    [Edit] When I checked "Remember me next time" on the login form it logged me into the admin correctly... I'm looking to see if there are any other issues.

  • briley
    Avatar
    Community Member
    7 Posts

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

    After a lot of poking around, I found that the issue was that the server was not saving session data correctly - the folder defined in php.ini (session.save_path) was not writeable. I changed the directory PHP saves session data in and things started working.

  • Webbower
    Avatar
    Community Member
    10 Posts

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

    I had the same problem happen to me after pulling down an already-built SS site from SVN and setting it up on my local. After logging in, when I tried to go to /admin, it would redirect me back to /Security/login/?BackURL=/admin with a message saying which account I was logged in as and a button to log in as someone else.

    The fix in the end was that I had to uncomment the session.save_path=/tmp line in my php.ini (version from MacPorts)

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