Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Install fails silently on creating database schema

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

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

Page: 1
Go to End
Author Topic: 1784 Views
  • DesignCity
    Avatar
    38 Posts

    Install fails silently on creating database schema Link to this post

    Hi Guys,

    First up, i'm really looking forward to creating my first SilverStripe site. I've used a few CMSs in the past, but none of the open source CMSs are really what i'd call production quality - you can run a fan site or a club site fine on Joomla, but when it comes to a corporate site that needs to be flexible and easy to use at the same time, most of the solutions have let me down. SilverStripe seems to be the right mix or ease of use and flexibility that a professional needs!

    On to my reason for posting - an installations problem.

    I get the following once I try to install Silverstripe:

    Installing SilverStripe...

    I am now running through the installation steps (this should take about 30 seconds)

    If you receive a fatal error, refresh this page to continue the installation
    Creating 'tutorial/_config.php'...
    Creating '.htaccess' file...
    Building database schema...

    ...Then nothing. Having a look around I see that opening "http://DOMAIN.COM/db/build?flush=1" can be of some help troubleshooting-wise, and this is the error I get:

    Fatal error: Cannot access protected property Director::$environment_type in /cust-web/i/e/I1323352/sites/DOMAIN.COM/html/sapphire/core/control/Director.php on line 331

    Any ideas on where I go from here or even what I might search for in Google? (yep, I'm that lost!)

    Much appreciated guys

  • Andy
    Avatar
    230 Posts

    Re: Install fails silently on creating database schema Link to this post

    Well you can solve this by changes the line

    static protected $environment_type;

    to

    static public $environment_type;

    at about line 338 of Director.php. It sounds like you have an older version of PHP, I would advise updating if possible - you may run into other issues.

  • DesignCity
    Avatar
    38 Posts

    Re: Install fails silently on creating database schema Link to this post

    My PHP version is 5.2.1 - You're right Andy, I'm running into other problems!

    I ended up bypassing my installer problems and just uploaded a finished site from my local machine - no more problems with $environment_type.

    There's obviously still a problem, I'm now presented with the follwoing error:

    Fatal error: Class 'ReflectionClass' not found in /cust-web/i/e/client/sites/www.site.com/html/sapphire/core/Object.php on line 215

    I'd really like to _not_ have to ask the client to move servers for their new site - anything that makes the process seem more complicated is never a good thing for a layperson. Is there a fix for this error, or am I going to have to bite the bullet and move to another host?

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Install fails silently on creating database schema Link to this post

    I assume you've tried ?flush=1 already?

    Sean

  • DesignCity
    Avatar
    38 Posts

    Re: Install fails silently on creating database schema Link to this post

    Yep, thanks Sean, tried ?flush=1 and even gave /db/build?flush=1 a go...

    What's really strange on this server (other servers i've installed silverstripe on are fine) is that I keep getting different errors. Each time I fire up the browser I get a new error - this morning's was:

    Fatal error: Cannot access protected property Object::$classConstructed in /cust-web/i/e/client/sites/www.site.com/html/sapphire/core/Object.php on line 97

    So following Andy's advice, I changed 'public' to 'protected' for $classConstructed as well, and now I get nothing - no error, silverstripe just fails to load

  • DesignCity
    Avatar
    38 Posts

    Re: Install fails silently on creating database schema Link to this post

    Adding to my installation woes on this server is the following when I try to install 2.1 rc1 - however I'm pretty sure it was the same error with 2.02b:

    [html]
    <h1>Installing SilverStripe...</h1>
    <p>I am now running through the installation steps (this should take about 30 seconds)</p>
    <p>If you receive a fatal error, refresh this page to continue the installation
    <li>Creating 'mysite/_config.php'...</li>
    <li>Creating '.htaccess' file...</li>
    <li>Building database schema...</li><br />
    <b>Fatal error</b>: Class 'ReflectionClass' not found in <b>/cust-web/i/e/I1323352/sites/www.sultan.net.au/html/ss/sapphire/core/Object.php</b> on line <b>246</b><br />
    [/html]

    Any SS'ers know what might be causing this?

    Cheers
    Michael

  • radu
    Avatar
    Community Member
    3 Posts

    Re: Install fails silently on creating database schema Link to this post

    This happens regardless of the version if you don't have the reflection php option enabled when compiling php.

    I had the issue with 2.2.3 and i found the solution here: http://logs.silverstripe.com/index.php?date=2008-02-16

    On the short, check to make sure you are compiling PHP with support for reflection, either by setting the correct compilation flags or by ensuring you don't set the --disable-reflection when compiling.

    Also, for other issues that don't seem to relate to user classes you might want to check if those classes are not part of php, enable them and recompile php (if you can afford to do that)..

    regards.

    later edit: and don't forget to restart apache before you make another attempt at installing silverstripe.

    1784 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.