Session Not Setting Up

Discussion forum for MOD Writers regarding MOD Development.
Registered User
Posts: 69
Joined: Mon Jan 15, 2007 10:28 pm

Session Not Setting Up

Post by cheechm » Sat May 17, 2008 10:30 am

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->setup(false, 1);
Also does append_sid() add the current users' SID to the link? Or am I doing something wrong:


User avatar
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run

Re: Session Not Setting Up

Post by A_Jelly_Doughnut » Sat May 17, 2008 7:15 pm

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).
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish


Return to “[3.0.x] MOD Writers Discussion”