setcookie function to apply to both http://www.domain.net and http://domain.net setcookie function to apply to both http://www.domain.net and http://domain.net
 

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

setcookie function to apply to both http://www.domain.net and http://domain.net

Started by jwallpapers, June 26, 2008, 01:00:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jwallpapers

the default setcookie function is:

setcookie($CONFIG['cookie_name'].'_data', $data, time()+86400*30, $CONFIG['cookie_path']);

It does not set the domain name.

The problem here is that, the cookie only works for http://www.domain.net, and NOT http://domain.net. So i edited it to include a domain name ".domain.net" so that any subdomain will still use that cookie as well as http://domain.net. It already works for IE, but for some odd reason it doesn't work for Firefox. I've tried removing all the cookies and then logging in again with the "Remember this" but it still doesn't work. I am recognized as a logged in user in http://www.domain.net but http://domain.net does not recognize me.

Kindly advise what I am missing. Is there any other function I need to edit?

Thanks!

Nibbler

That's not the auth cookie. Assuming you are running unbridged, you need to edit bridge/coppermine.inc.php coppermine_udb::create_session();