Problems with append_sid

Discuss the development of future releases of phpBB (phpBB 3.x minor releases) and MODing/Coding related questions.
Post Reply
scworldnetter
New member
New member
Posts: 2
Joined: 12 Apr 2011, 00:11

Problems with append_sid

Post by scworldnetter »

I've been having issues with append_sid calls where the SID is not getting appended like it should. I realize the function does this only for those URLs that need it, but in this case, it's the logout function, more specifically,

Code: Select all

'U_LOGIN_LOGOUT'       => append_sid("{$phpbb_root_path}ucp.{$phpEx}?mode=logout&redirect={$phpbb_root_path}mainpage.{$phpEx}"), 'S_SN_MP_' . strtoupper($mode)                   => true,


I can't seem to figure out why the append isn't appending, of course, as a result, the logout fails.

I have the main global variables declared:

Code: Select all

   global $phpEx, $user, $template, $phpbb_root_path;


On the same token, I have an another issue with append_sid in that it only assigns absolute paths with urls it knows, anytime I do append_sid on custom functions, it leaves it as a relative path in the template: ./whatever
rather than http://domain/phpbbroot/whatever. I make heavy use of Apache mod_rewrite to create user friendly URLs, and of course, in those cases, the relative paths break if the mod_rewrite changes the directory structure.

Thanks for any tips.
User avatar
tumba25
Supporter
Supporter
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: Problems with append_sid

Post by tumba25 »

You are using the phpBB2 append_sid call. It has been changed in phpBB3.

Try this.

Code: Select all

'U_LOGIN_LOGOUT'       => append_sid("{$phpbb_root_path}ucp.{$phpEx}", "mode=logout&redirect={$phpbb_root_path}mainpage.{$phpEx}"),


This should be on its own line.

Code: Select all

 'S_SN_MP_' . strtoupper($mode)                   => true,
Post Reply