Page 1 of 1

Session Not Setting Up

Posted: Sat May 17, 2008 10:30 am
by cheechm
Why isn't my session setting up?

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : 'forum/';
$phpEx = substr(strrchr(__file__, '.'), 1);
include ($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(false, 1);
Also does append_sid() add the current users' SID to the link? Or am I doing something wrong:
append_sid('forum/search.php'

Thanks

Re: Session Not Setting Up

Posted: Sat May 17, 2008 7:15 pm
by A_Jelly_Doughnut
That code looks correct. A session should be started, even if it is only a guest session.

Append_sid does handle the adding SID to the link. That is the correct syntax if there is no query string (for example, the underlined part of viewforum.php?f=14).