[mapguide-users] Problem with $resourceService (PHP)

Galois amihalas at yahoo.gr
Wed Oct 29 09:33:06 EDT 2008


I have two problems so If anyone knows something I would appreciate his/her

Problem 1
when I define a resourceService, my page doesn't show.

The code is copy - paste from Dev's Guide:

	$installDir = 'C:\Program Files\MapGuideOpenSource\\';
	$extensionsDir = $installDir . 'WebServerExtensions\www\\';
	$viewerDir = $extensionsDir . 'mapviewerphp\\';
	include $viewerDir . 'constants.php';
	MgInitializeWebTier($extensionsDir . 'webconfig.ini');
	$site = new MgSite();
	$site->Open(new MgUserInformation("Administrator", "admin"));
	$sessionId = $site->CreateSession();
	// Get the user information using the session id,
	// and set up a connection to the site server.
	$userInfo = new MgUserInformation($sessionId);
	$siteConnection = new MgSiteConnection();
	// Get an instance of the required service(s).
	$resourceService =
        // Display the spatial reference system used for the map.
	$map = new MgMap();
	$map->Open($resourceService, $mgMapName);
	$srs = $map->GetMapSRS();
<title>Simple Sample Application</title>
<body marginheight="0" marginwidth="0">
<iframe id="viewerFrame" width="100%" height="100%" frameborder=0
$webLayout ?>&username=Administrator&password=admin"></iframe>

If I comment the lines from where I define $resourceService till the end of
php script, my map is loading...

Problem 2
When I try to run the phpSamples (for example the Hello Map) and I press on
the "Display Spatial Reference  ", I get the following error:

"Error: Invalid argument(s): [1] = "" The session ID is invalid because the
session separator character was not found. Exception occurred in method
MgUserInformation.SetMgSessionId at line 165 in file

Generally, I cannot run any of the samples...

Thanks in Advance!
View this message in context: http://www.nabble.com/Problem-with-%24resourceService-%28PHP%29-tp20227195p20227195.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list