[mapguide-users] How to check if session is expired?

François Van Der Biest francois.van-der-biest at onf.fr
Thu Sep 28 10:42:13 EDT 2006


François Van Der Biest a écrit :
> Jackie Ng a écrit :
>> But now when I try to access my map with this newly generated session 
>> id. I
>> get "Resource not found" errors. I thought that session resources 
>> would be
>> automatically created with the new session as stated in the API docs. 
>> (???)
Hi Jackie,

I found a solution to my problem, where the map resource did not exist 
in session repository at startup.

It seems that the creation of the map resources in the session 
repository is done by the viewer, but it takes some time before this is 
achieved. Therefore, I had to slow a little bit things before my script 
completely executes itself.
Maybe it's a bit dirty, but at least, it works : I just inserted a 
"usleep(500000);" before opening the map resource 
($map->Open($resourceService, $mapName);) and startup is OK now.

Hoping this will help,

F.




More information about the Mapguide-users mailing list