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.

General Questions

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

Cannot login to established site -- please help


8 Posts   2429 Views


1 July 2009 at 8:17am Community Member, 9 Posts

Installed manually two weeks ago with nature theme. Running smoothly since. Today had to hit reset password because it would not let me in. Followed email link, reset password, but then new page is blank. Password is not reset, cannot login.

The site was just fine before password reset, and it is still up, but I cannot access the admin area. Thank you for your assistance.


1 July 2009 at 8:26am Forum Moderator, 474 Posts

You can use a default login to get in and reset your password. Have a look at [url=]this[/url].


1 July 2009 at 8:40am Community Member, 9 Posts

That did not work... I think there is a problem with the mysite/config.php file. Everytime I try to login, for a split second I can see a line of text at the top of the page that refers to whatever the last line of mysite/config.php is.

Is there a default mysite/config.php I can copy or look over to find my error?


1 July 2009 at 8:47am Forum Moderator, 474 Posts

It sounds like you added the line outside of the closing ?> in mysite/_config.php. It needs to be in-between the <?php and ?>


1 July 2009 at 9:18am Community Member, 9 Posts

No, there is a <?php at the top and a ?> at the bottom. Any other suggestions? I'm sure its on this page. I've attached it, without my site info, of course. Can you see any errors?

Attached Files

1 July 2009 at 8:17pm Community Member, 901 Posts

There's a strange first line in your attached file:

Editing: Encoding :

Not sure where it's coming from. The _config.php file should look somewhat like that:


global $project;
$project = 'mysite';

global $databaseConfig;

$databaseConfig = array(
   'type' => 'MySQLDatabase',
   'server' => 'localhost',
   'username' => 'user',
   'password' => 'pass',
   'database' => 'dbname'
// Sites running on the following servers will be
// run in development mode. See
// for a description of what dev mode does.

Also, I'm not sure why you have these lines in your _config.php

global $database;
$database = "troxlers_silverstripe";

Could it be that you're running a really old version of SilverStripe? As far as I know, the _config.php looks more or less like the one I posted since version 2.0.


2 July 2009 at 12:19am Administrator, 685 Posts

You've got some text outside of the <?php ... ?> tags in one of your files, probably _config.php. This is showing up as the text at the top of your page, and it's preventing SilverStripe from writing the session cookies that are necessary to log in.


2 July 2009 at 3:15am Community Member, 9 Posts

It worked ... thank you so much for giving me an idea of what belongs in this file! I only had to remove the content you identified and the additional content at the bottom to make it work. I don't remember where I got these lines of code, but it was from the silverstripe site. The last content was to identify the default email receiver from a shopping cart email.

Apparently that was what was causing the issue. I'll need to read the install for the shopping cart module again. Really appreciate your help. Thanks.