Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » SilverStripe book samples

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

Page: 1
Go to End
Author Topic: 759 Views
  • Ken23
    Avatar
    Community Member
    2 Posts

    SilverStripe book samples Link to this post

    Having bought the Silverstripe book by Ingo Schommer and Steven Broschart I'm now trying to get the sample sites to work.

    I've put the example files into C:/wamp/www/4_first_steps/

    I copied the 4_first_steps/mysite/_config_example.php file to the 4_first_steps/mysite/_config.php file, and changed the database credentials to suit my setup – this is what the GitHub page says to do (I think…)

    I had to manually create a database using PHPMyAdmin, then imported the database.sql included in the sample.

    Then I attempt to load http://localhost/4_first_steps/ and get the error:
    Fatal error: 'continue' operator with non-constant operand is no longer supported in C:\wamp\www\4_first_steps\sapphire\core\ManifestBuilder.php on line 151

    So I edit (line 149 of) that file to include a missing end-of-line semicolon.

    Then a get a series of errors:
    Strict standards: Declaration of Controller::handleRequest() should be compatible with RequestHandler::handleRequest($request) in C:\wamp\www\4_first_steps\sapphire\core\control\Controller.php on line 12
    Strict standards: Declaration of CMSMain::getRecord() should be compatible with LeftAndMain::getRecord($id, $className = NULL) in C:\wamp\www\4_first_steps\cms\code\CMSMain.php on line 11
    Notice: Array to string conversion in C:\wamp\www\4_first_steps\sapphire\dev\Debug.php on line 558
    With some quoted code in between.

    Doubtless I'm making some fundamental mistake - can anyone help with this? Note that the demo site set up as part of my first clean install works fine.

  • IOTI
    Avatar
    Community Member
    187 Posts

    Re: SilverStripe book samples Link to this post

    The book by Ingo/Steven was written for SS v2.X. I'm betting your using SS v3.0. The example files you refer are probably written for v2.X as well so they won't be compatible with SS v3.0. While you can still definitely learn a lot from the book (I haven't read it but i'm sure its quite good) some code will not be compatible with v3.0.

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: SilverStripe book samples Link to this post

    You're running an old version of 2.3/2.4 on PHP 5.4. Either upgrade to 2.4.10, downgrade to PHP 5.3 or upgrade to 3.x.

  • Ken23
    Avatar
    Community Member
    2 Posts

    Re: SilverStripe book samples Link to this post

    That would explain it - glad it's not my imbecility ;)
    I'll forge ahead without that code.

    759 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.