[Cartoweb-users] retrieve cartoweb session

Oliver Christen oliver.christen at camptocamp.com
Mon Feb 4 04:30:14 EST 2008


well,
> - send the PHPSESSID to cartoweb in the Curl call
> - send the user cookie via curl
this should works, so I would say something is wrong with the way the 
PHPSESSID or the cookie value are sent to the server from curl.
Did you verify the PHPSESSID or cookie are correctly received by php? you 
can check that by doing a print_r de $_COOKIE or $_REQUEST on cartoweb side.

regards
Oliver

----- Original Message ----- 
From: "Simon ORTET" <simon.ortet at silogic.fr>
To: "cartoweb" <cartoweb-users at lists.maptools.org>
Sent: Wednesday, January 30, 2008 5:34 PM
Subject: [Cartoweb-users] retrieve cartoweb session


> Hello
>
> I have a problem with sessions and cookies:
>
> The user load my application, it makes a call to cartoweb via CURL:
>        $ch = curl_init();
>        $timeout = 5; // set to zero for no timeout  curl_setopt ($ch, 
> CURLOPT_URL, $this->servApp.$this->aliasCartoweb."/client.php");
>        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
>        curl_setopt($ch, CURLOPT_POST, 1);
>        curl_setopt($ch, CURLOPT_POSTFIELDS, 
> "ajaxActionRequest=Location.Zoom");
>        curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
>        $data = curl_exec($ch);
>        curl_close($ch);
> With the values from the XML returned i update the GUI of my application 
> (map, overview, scale, layers...)
>
> Then the user make some actions (zoom in, adds some layers...etc). All the 
> actions are AJAX requests to cartoweb. The page is never reloaded.
> Actually the problem comes when i reload the page. An new curl session is 
> send and my cartoweb session is lost. So all the actions made by the user 
> are lost.
>
> So my problem is: how can i retrieve the cartoweb session lost so the user 
> gets back his context after reloading the page?
>
>
>
> I tried several things:
> - send the PHPSESSID to cartoweb in the Curl call
> - send the user cookie via curl
>
> Nothing works until then. I'm stuck
>
> Any help would be very appreciated
>
>
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list