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


Reply


8 Posts   2522 Views

Avatar
maryluke

Community Member, 9 Posts

1 July 2009 at 8:17am

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.

Avatar
simon_w

Forum Moderator, 474 Posts

1 July 2009 at 8:26am

You can use a default login to get in and reset your password. Have a look at [url=http://doc.silverstripe.com/doku.php?id=recovering_password]this[/url].

Avatar
maryluke

Community Member, 9 Posts

1 July 2009 at 8:40am

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?

Avatar
simon_w

Forum Moderator, 474 Posts

1 July 2009 at 8:47am

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

Avatar
maryluke

Community Member, 9 Posts

1 July 2009 at 9:18am

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
Avatar
banal

Community Member, 901 Posts

1 July 2009 at 8:17pm

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:

<?php

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
// http://doc.silverstripe.com/doku.php?id=devmode
// for a description of what dev mode does.
Director::set_dev_servers(array(
   'localhost',
   '127.0.0.1',
));

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

global $database;
$database = "troxlers_silverstripe";
require_once("conf/ConfigureFromEnv.php");

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.

Avatar
Sam

Administrator, 685 Posts

2 July 2009 at 12:19am

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.

Avatar
maryluke

Community Member, 9 Posts

2 July 2009 at 3:15am

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.