coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: rmatakajr on April 28, 2009, 12:11:50 AM

Title: Coppermine 1.4.x Cookie Information
Post by: rmatakajr on April 28, 2009, 12:11:50 AM
Hi,

Im new to coppermine, but not to PHP I have accomplished creating a custom bridge from my application
to coppermine using HTTP techniques, in other words i did not mess with any core files or bridge settings.

I didnt want to bother you guys but i have been searching Google and the forums all day with no luck. I just need
to know what I must set in the cookie for coppermine to reconize the login. This way i can set the
cookie from my application so coopermine thinks the user is logged in. I looked through the bridge files and
includes and dont see where this is being set?

Any help is appreciated.

Thanks
Rick
Title: Re: Coppermine 1.4.x Cookie Information
Post by: Nibbler on April 28, 2009, 12:26:13 AM
Did you actually make a custom bridge file or are you trying to do it all backwards?

Maybe http://forum.coppermine-gallery.net/index.php/topic,45376.0.html can help you.
Title: Re: Coppermine 1.4.x Cookie Information
Post by: rmatakajr on April 28, 2009, 03:50:48 AM
Hi Nibbler,

Thanks for the reply. Im actually doing it all backwards! Basicly I created a file that sits in CPG enviroment
and adds a user to the database.. I use some fopen with headers to emulate a post method to this file
which in return adds the user to coppermine and then echos the user_id in return (on success that is!)

Anyhow i just need to know what i have to set in the cookie after this is done so the user is logged into
coppermine.

I see from your post you would

$this->client_id = md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['SERVER_PROTOCOL'].$CONFIG['site_url']);

Then

$sessioncookie = $_COOKIE[$this->client_id];

Then we concat like you said

$session_id = $sessioncookie.$this->client_id;

But now you are checking for a session in the DB.. at this point there i need to just

setcookie(cpg_data??)

and be done with it! Well for that browser session that is..

I appreciate your help in advance

Rick!