Advanced search  

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

Pages: [1]   Go Down

Author Topic: Coppermine 1.4.x Cookie Information  (Read 3723 times)

0 Members and 1 Guest are viewing this topic.

rmatakajr

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Coppermine 1.4.x Cookie Information
« 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
Logged

Nibbler

  • Guest
Re: Coppermine 1.4.x Cookie Information
« Reply #1 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.
Logged

rmatakajr

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Coppermine 1.4.x Cookie Information
« Reply #2 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

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

Code: [Select]
$sessioncookie = $_COOKIE[$this->client_id];
Then we concat like you said

Code: [Select]
$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

Code: [Select]
setcookie(cpg_data??)
and be done with it! Well for that browser session that is..

I appreciate your help in advance

Rick!
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.