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.

General Questions /

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

Can I use silverstripe session variables in a non ss php page?


Reply


3 Posts   467 Views

Avatar
Hemant

Community Member, 2 Posts

28 August 2013 at 5:28pm

I need to use the session variables set in silverstripe in some php pages to get user details for the member who is logged in. Is there any way to do it?

Thanks!

Avatar
Sean

Forum Moderator, 922 Posts

3 September 2013 at 5:31pm

If you're using the same domain sharing cookies is possible.

Sessions are a bit harder. You would need to pass in the session ID from one site to another and re-start the session using the given ID. It's potentially a problem with security.

What are you trying to achieve with sharing of variables between different scripts?

Avatar
Hemant

Community Member, 2 Posts

3 September 2013 at 5:45pm

I was building an extension for a silverstripe system on php. Anyways got the thing working moments after posting this query :) the same domain allows sharing session variables as well (which for some reason I thought wouldn't work and hence didn't try)

Thanks anyways!