Coppermine 1.4.x Cookie Information Coppermine 1.4.x Cookie Information
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Coppermine 1.4.x Cookie Information

Started by rmatakajr, April 28, 2009, 12:11:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rmatakajr

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

Nibbler

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.

rmatakajr

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!