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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Problems with tutorial


Go to End


4 Posts   1174 Views

Avatar
litlfrog

Community Member, 4 Posts

21 May 2009 at 2:58am

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?

Avatar
MartinPhone

Community Member, 57 Posts

22 May 2009 at 12:00am

Edited: 22/05/2009 12:01am

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?

Avatar
litlfrog

Community Member, 4 Posts

24 May 2009 at 10:38am

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?

Avatar
PGiessler

Community Member, 47 Posts

25 May 2009 at 7:48pm

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