Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Can't login after fresh install


Go to End


5 Posts   2306 Views

Avatar
curlygeek

Community Member, 4 Posts

18 November 2015 at 9:38am

Hi there,

I am trying to install Silverstripe on a freshly setup VPS with Apache/2.4.7, Ubuntu 14.04, PHP 5.5.9. Every time I try the install, it happily goes through with no errors and I end up on the "Installation Successful" page, but the email and password section has no values (I presume it should show at least the email there?) When I click on the link to edit my content by opening the CMS, it takes me to a login screen where my login details are rejected every time I type them in. The fields go red, presumably to indicate the credentials are incorrect, but no message displays.

The database displays my email in the Members table. I have tried installing with a username instead of an email but the results are still the same.

I have tried installing many times, and also tried installing both 3.1 and 3.2. I have tried adding Security::setDefaultAdmin('admin','password'); to my _config.php, and this adds a user to the database, but those credentials don't work either.

I feel like it isn't a problem with silverstripe, but perhaps some setting on my VPS - though I don't know where to start looking. Hope it is something really simple!

Can anyone point me in the right direction? :0)

Avatar
helenclarko

Community Member, 166 Posts

18 November 2015 at 12:32pm

Hi CurlyGeek,

Any error messages in any of your logs?
Have you tried running a /dev/build?flush=all

Using Security::setDefaultAdmin('admin','password'); should have done the trick.

-helenclarko

Avatar
curlygeek

Community Member, 4 Posts

18 November 2015 at 1:50pm

Thanks helenclarko,

Yes, sorry I should have added that I had tried that too after a suggestion in another forum post - very frustrating! It seems like the whole login process isn't functioning properly, but I don't know Silverstripe at all so I can't think where to start looking for a solution. I even tried a few different browsers in case it was some weird javascript issue or something but no luck. I know wordpress had a similar problem involving cookies which was solved by making sure you were using https, but that isn't the issue here.

There are no issues in my apache error/access logs but I don't know about Silverstripe logs - where would I find those if there are any?

Avatar
curlygeek

Community Member, 4 Posts

18 November 2015 at 9:59pm

I have done some hacking around with some logging and I can see that Member::currentUser() does contain all my details so I presume that means I am successfully authenticating. But for some reason it is stuck in the login loop and won't let me past it.

Avatar
curlygeek

Community Member, 4 Posts

19 November 2015 at 8:28am

Worked out the issue was being caused by cookies. The login started working when I removed the secure cookie directive from apache: Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure