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.

Archive

Our old forums are still available as a read-only archive.

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

Can't Access


Reply

18 Posts   9465 Views

Avatar
Sigurd

30 March 2007 at 6:15am Forum Moderator, 628 Posts

There's something weird at your end, possibly due to your PHP version (5.0.5).

The following code in sapphire/security/Permission.php (static function groupList) fails:

if($groups) foreach($groups as $group) $groupList[] = $group->ID;
   
For somereason the foreach doesn't run.

I've put a hack in your code below this line:

$groupList[] = 1;

I can now login, but it now assumes every member of your site is an admin (you are the only user, so this is kinda okay for now).

I'll see if someone else can shed light on this....

Avatar
keaven

1 April 2007 at 4:17pm Community Member, 4 Posts

i reinstalled everything... and my mysite/_config.php file looks like this:

<?

global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "localhost",
   "username" => "<username>",
   "password" => "<password>",
   "database" => "<database name>",
);

?>

so... Sigurd, that line you mentioned (Security::setDefaultAdmin('admin','password'); ) is not there. where should it go?

Avatar
sroveda

3 April 2007 at 8:22am Community Member, 2 Posts

ok, after all these changes i've managed to login, but now i have 2 other problems, in the Security tab, i've got the following: Fatal error: Cannot access protected property Form::$actions in /home/sparknet/public_html/cms/sapphire/forms/TabularStyle.php on line 44,
and in the content tab, the button to publish the edited page didn't appear, i can only save my draft

Avatar
wicnz

17 April 2007 at 3:46pm Community Member, 2 Posts

Seems to be serious bugs in the sapphire security module.

PHP 5.0.5-Debian-0.8~sarge1 (cli) (built: Oct 27 2005 10:43:05)

I got the errors: "You can't access that part of the CMS" on first login with admin/password.

I fixed that by overriding the groupID patch
When trying to access security groups via Security section, I now get:

Fatal error: Cannot access protected property TextField::$value in /home/www/ispconfig/web6/web/silverstripe-v2.0/sapphire/forms/TableField.php on line 537

I have tried to override this by setting

public static $currentController

in sapphire/core/control/Controller.php

but this doesn't appear to work.

Can you advise on a fix for this bug and/or advise if it is fixed in 2.0.1rc?
Is this release genuinely stable or is it really beta?

Avatar
Sean

17 April 2007 at 4:22pm Forum Moderator, 921 Posts

Which version are you using?

Could you please try 2.0.1rc7 and see if it works for you, then we can confirm that this was fixed. :-)

http://www.silverstripe.com/assets/rc/silverstripe-v2.0.1-rc7.tar.gz

Cheers!
Sean

Avatar
wicnz

17 April 2007 at 11:22pm Community Member, 2 Posts

Hi Sean,
The issue seems to be with PHP 5.0.5

I have built a new test install with PHP 5.2.0 and Silverstripe 2.0.1rc7 and it works without errors.

Andy is taking a look at my PHP 5.0.5 server to see if he can get 2.0.2 working on it tomorrow I think.

Avatar
Andy

18 April 2007 at 11:59am 230 Posts

These problems should now be all fixed. They'll be fixed in the daily build tonight, and will be in 2.0.2.

Cheers!

Avatar
Nicolaas

8 September 2007 at 7:26pm Forum Moderator, 213 Posts

I am having the same problem when opening the newly installed CMS

Fatal error: Cannot access protected property Controller::$currentController in /...../sapphire/security/Security.php on line 108

I have changed /mysite/_config.php, and added:
Security::setDefaultAdmin('admin','password');

I can't access the CMS. What can I do???

TIA

Nicolaas