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

Building database schema... Fatal error: Call to undefined method Hierarchy::extradbfields()


Go to End


4 Posts   3072 Views

Avatar
jarvis

Community Member, 1 Post

20 February 2010 at 1:10am

Hi All,

Am new so my apologies if I don't know what I'm talking about.

I'm trying to install Silverstripe locally. However, I get the following error:
Building database schema...
Fatal error: Call to undefined method Hierarchy::extradbfields() in C:\Program Files\Apache Group\Apache2\htdocs\silverstripe\sapphire\core\model\DataObjectDecorator.php on line 67

I've tried to refresh numerous times as per the comment above the install progress:
If you receive a fatal error, refresh this page to continue the installation

Unfortunately, this had no effect what-so-ever.

I'm running the following:
PHP Version: 5.0.5
Apache: Apache/2.0.63 (Win32) PHP/5.0.5
MySQl Client API version : 4.1.7

I hope that helps. Thanks in advanced,

jarvis

Avatar
Willr

Forum Moderator, 5523 Posts

20 February 2010 at 1:37pm

What version of SS are you trying to install? trying to use any modules as well? extraDBFields was renamed extraStatics quite a while ago so code shouldn't be calling that

Avatar
megerlin

Community Member, 1 Post

8 March 2010 at 10:59pm

Edited: 09/03/2010 3:09am

I have this problem too with the latest stable version (2.3.6).
I have no idea how to fix that. Changing extraDBFields to extraStatics some lines above only leads to other errors.

I use PHP Version 5.0.5 too. Maybe this has something to do with that fact?
I also tried Version 2.3.5, this did fail too.

With version 2.3.1 I got follwing error:
[...]
# Building database schema...

Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /xxx/httpdocs/sapphire/security/Member.php on line 982

Avatar
Sean

Forum Moderator, 922 Posts

9 March 2010 at 11:10am

Edited: 09/03/2010 11:12am

I think this may be an incompatibility issue with some of the code in Member.php (the array type hint) for the arguments to a method that don't work in PHP 5.0.5.

EDIT: I found some information here that indicates array typing wasn't introduced until PHP 5.1: http://php.net/manual/en/language.oop5.typehinting.php hence why it won't work.