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


Go to End

4 Posts   1696 Views


Community Member, 7 Posts

6 February 2009 at 1:06am

I have developed an all PHP site frontend with much SQL
operations. One of the needs is to link from the PHP system
to the SS portion as the SS design is really great for handling the
CMS part.

I can not figure out how to send the session data to the SS system.
I am using this method from the frontend

$_SESSION['session_var'] = "Testing123";


<form action='sessionTest2.php' method='POST'>

I have the frontend linking well to the SS portion.
But I want to lock down the SS portion so the user has to come thru
the frontend. I figure I can lock it down if I pass the session info to the SS start page,
but how to accomplish this task?

Thanks so very much.


Forum Moderator, 4102 Posts

6 February 2009 at 3:29am

Sessions are handled by Session::get() and Session::set(), AFAIK.

If you're trying to keep your form secure, however, you want to use the permission class.

    	if(!Permission::check('ADMIN')) {
					"You must be logged in to use this form."


Community Member, 7 Posts

6 February 2009 at 5:02am

thanks for the reply.

All well and good, except, I really need an example of how to do this.

Where does one place the code to accomplish the transfer of $_SESSION data?

Do you have a complete example I can study and test?

Once I see the mechanism, I will better understand the process.

Thanks again


Community Member, 55 Posts

14 May 2009 at 2:09pm

How'd you go with this Steve?

I'm trying to get my head around SS sessions myself. I believe to get your $_SESSION data, in the controller you can use
Session::start($_SESSION) and it should transfer everything to the Session object.


Is this what you did?