Why is Cookie failing?

iearn

Joined: 2006-12-20
Posts: 22
Posted: Fri, 2007-07-06 13:25

Hi,

We are using:

$ret = GalleryEmbed::init(array('fullInit' => true));
if ($ret) { die('An error occurred'); }
$ret = GalleryEmbed::login($userIdFromYourApplication);
if ($ret) { die('An error occurred'); }
$ret = GalleryEmbed::done();
if ($ret) { die('An error occurred'); }

To set a cookie after a user has logged into our site (Drupal 4.7 with g2 embedded). We are trying to figure out why in some cases (so far it seems slightly random) this cookie fails to be set. In most cases it works, however some times in IE7/6 (maybe other browsers but so far IE) this cookie fails to be set. Therefore if a user goes to a page g2 content accessibly only to authenticated users, they get broken images. Can some please let me know how I can better diagnose this error. Does g2 have any advanced logging? I really need a way to ensure the user gets this cookie and if it can't get set shows them an error screen.

Any help tips etc. would be greatly appreciated.

thanks,
iEARN

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-07-09 13:00

do you get an error? (is $ret null or not)
is the user maybe already logged into g2?
do you start outputting anything before this call? http headers (cookies) can't be set once you've started to send data to the client.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage