Advertisement:

Author Topic: Use $context with SSI in parent basedir?  (Read 3590 times)

Offline DarKChAm

  • Semi-Newbie
  • *
  • Posts: 14
Use $context with SSI in parent basedir?
« 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 :
Code: [Select]
<?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.
« Last Edit: April 03, 2008, 01:33:01 PM by DarKChAm »

Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: Use $context with SSI in parent basedir?
« Reply #1 on: April 02, 2008, 10:45:53 PM »
If you want to display an array, use
Code: [Select]
echo '<pre>', print_r($context, true), '</pre>';
I use var_dump only for reading variable.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Offline DarKChAm

  • Semi-Newbie
  • *
  • Posts: 14
Re: Use $context with SSI in parent basedir?
« Reply #2 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 :/!

Offline Spaceman-Spiff

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,524
  • Gender: Male
Re: Use $context with SSI in parent basedir?
« Reply #3 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".

Offline DarKChAm

  • Semi-Newbie
  • *
  • Posts: 14
Re: Use $context with SSI in parent basedir?
« Reply #4 on: April 03, 2008, 01:32:42 PM »
Ok, easily...
I knew ever disabled this option...
Thanks so :) !