Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Problems with tutorial

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: 916 Views
  • litlfrog
    Avatar
    Community Member
    4 Posts

    Problems with tutorial Link to this post

    First, I'm unable to flush the cache. When I try to load http://localhost/admin/?flush=1/, I get an error will the following information. Line 120 appears in red.

    [Notice] Undefined variable: _SESSION
    GET /admin/?flush=1/
    . . . . .
    119       // Load the session into the controller
    120       $session = new Session($_SESSION);
    121       $result = Director::handleRequest($req, $session);
    122       $session->inst_save();

    Also, I don't seem to be able to create a new page type. I followed the instructions saying:
    "Create a new file HomePage.php in mysite/code. Copy the following code into it: "

    When I try to change the type of page in the CMS though, HomePage still doesn't appear. What am I missing here?

  • MartinPhone
    Avatar
    Community Member
    57 Posts

    Re: Problems with tutorial Link to this post

    If you try it with another name - ie not homepage but something more weird like badgerface - I know I had similar problems when I tried making a new homepage type. Don't use underscores in your page name either though as that messed it up too.
    <br >
    <br >Does the /dev/build/ work with no errors?

  • litlfrog
    Avatar
    Community Member
    4 Posts

    Re: Problems with tutorial Link to this post

    That doesn't seem to change anything. I changed the file name, restarted Apache, but I still don't see a different page type. Not being able to know whether the cache is flushed is pretty annoying too--that seems like it should be a straightforward task, but I still get the same error.

    I'd like to learn SilverStripe because a good friend of mine uses it for work. It's frustrating though, not being able to learn more because I can't create my own page type or flush the cache using the provided instructions. Am I missing something simple here?

  • PGiessler
    Avatar
    Community Member
    47 Posts

    Re: Problems with tutorial Link to this post

    Hi litlfrog,

    Are you sure, that your SilverStripe installation was successful?. Furthermore are you logged in as Administrator, if you want to flush the cache? Because the $_SESSION Variable is an array with your MemberID and other values. So if you aren't logged in as Administrator then you haven't a Session Variable, so SilverStripe shows you an error of undefinied variable.

    Best regards,

    Pascal

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