Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: DarKChAm on April 02, 2008, 12:54:01 PM

Title: Use $context with SSI in parent basedir?
Post by: DarKChAm on April 02, 2008, 12:54:01 PM
Hello,

I've search in this board but I haven't found this question. So, Can I use the $context var with SSI in the parent directory of the forum?

I've tried this, as a test :
<?php
require("<forum_base_name>\\SSI.php");
ssi_welcome();
?>


And in my function ssi_welcome() I've added a var_dump($context) in order to see what does this array contains. But, even if I'm logged on the forum, if I put the test file into forum's directory, it work and $context['user']['is_logged'] is true.
But if I put the test file in the parent directory, it don't working, and my var is false.

How can I do to use the context var which is needed for my personnal bridge.

Thanks, and sorry for my bad english : I'm a young French.
Title: Re: Use $context with SSI in parent basedir?
Post by: Bulakbol on April 02, 2008, 10:45:53 PM
If you want to display an array, use
echo '<pre>', print_r($context, true), '</pre>';

I use var_dump only for reading variable.
Title: Re: Use $context with SSI in parent basedir?
Post by: DarKChAm on April 03, 2008, 01:00:33 PM
That is not my question...
I use var_dump only to debugage, it is not important, I just want to know why session are not conserved in parent folder :/!
Title: Re: Use $context with SSI in parent basedir?
Post by: Spaceman-Spiff on April 03, 2008, 01:19:36 PM
Is your forum installed in a subdomain or just a subfolder of the parent?

Make sure you have enabled Database Sessions, and disabled "Enable local storage of cookies".
Title: Re: Use $context with SSI in parent basedir?
Post by: DarKChAm on April 03, 2008, 01:32:42 PM
Ok, easily...
I knew ever disabled this option...
Thanks so :) !