[Phplib-trackers] [ phplib-Bugs-445191 ] sessions redirection problem on ISP
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2002-04-25 05:17:35
|
Bugs item #445191, was opened at 2001-07-28 01:08 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=445191&group_id=31885 Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: SUAU Romain (rsuau) >Assigned to: Richard Archer (richardarcher) Summary: sessions redirection problem on ISP Initial Comment: Hello, I got trouble for monthes on my french ISP www.free.fr using phplib for session handling. I thought it was their fault but I discovered the bug was caused by sessions.inc + crcloginform.ihtml. On some ISP like the one I use, your personal website URL (personal.free.fr) is different from the server hostname (proxyphp3.free.fr). So when redirection is done after setting the cookie, the url becomes wrong. It acts the same way on a Windows box when you get redirected to http://localhost/php.exe/... So is it possible to add a parameter in local.inc as to specify the website address for redirections. I tweaked the two files, like this (not a very good way): - sessions.inc (function release_token): header("Location: ". $PROTOCOL. "://".$HTTP_HOST.$this- >self_url()); becomes => // Patch if ("$HTTP_HOST" == "proxyphp3.free.fr") { header("Location: ". $PROTOCOL. ":/".$this->self_url()); } else { header("Location: ". $PROTOCOL. "://".$HTTP_HOST.$this->self_url()); } // patch end - crcloginform.ihtml (form generation): <form name="login" action="<?php $bonne_adresse=$this->url(); print ereg_replace("/personal.free.fr" , "" , $bonne_adresse); ?>" method=post> If you could do something in the next version, many people would appreciate I think. Regards SUAU Romain (rsuau.free.fr & www.hifiprix.com) ---------------------------------------------------------------------- >Comment By: Richard Archer (richardarcher) Date: 2002-04-25 15:17 Message: Logged In: YES user_id=279311 I'm killing this bug off. If you can't use cookies to maintain state, set $sess->mode="get". Don't forget to run all URLs in the site through $sess->url. Template makes this a breeze. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2001-07-28 16:24 Message: Logged In: NO But what do you use as cookie_domain = If you specify nothing there, the cookie left on the client is valid only for that very host, eg proxyphp3.free.fr, not for personal.free.fr Did you try specifying cookie_domain= free.fr ### ? Prpbbly this solves your ptoblem ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=445191&group_id=31885 |