phpBB session management with cpg 1.4.4 phpBB session management with cpg 1.4.4
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

phpBB session management with cpg 1.4.4

Started by MadMarian, March 27, 2006, 07:04:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MadMarian

Hey folks,

have my bridge finally working but a little problem with the session management. I already asked the guys from the phpBB support and they said it should work that way, so I hope one of you can help me out.

Here it goes:

I have a self coded homepage with phpBB and coppermine:

homepage: www.screamsilence.net
board: www.screamsilence.net/forum/
gallery: www.screamsilence.net/gallery/

Now I want my users to be able to login from anywhere via a loginbox in the left hand upper corner. Once logged in you see "Hallo <username>". This works for all my pages but for the gallery. The left hand part of the page is an extra php file which is included so that I have to change dates etc. only in one file. Now the first part of the session management I put into my theme.php

session_start();
define('IN_PHPBB', true);

$phpbb_root_path = '../forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);


And the second part I put into my extra file:

if($userdata['session_logged_in'])
$loginbox_header = "Hallo ".$userdata['username'];
else
$loginbox_header = "Login";


When I log in the cookie seems to be set correctly since the gallery shows the upload button for pictures. Also when I go to the forum or browse through my page... everywhere my login box says "Hallo <username>". Just not in the gallery.

I'd be glad for any ideas...

MadMarian

Alright cornered the problem. Seems to be connected to the custom header. My navigation.php file which contains the login box and dates etc. is included in cpg via custom header. Now when I put all my code for the login box into theme.php is works!!! But then the popup windows for the pictures are screwed up. So why can I not read out the session varibale in a file that's included via custom header?