[mapguide-users] Uncaught error on Map->Create() in MGOS 2.2

cheesybiscuits thomaschristian at gmail.com
Wed Feb 15 15:42:42 EST 2012


I'm testing out some 2.1 code on a new installation of MGOS 2.2 on RedHat
Linux and I can't get around an issue on Map->Create.

The script is very simple, it creates and opens a site connection, creates a
session, and then creates a new map without any issues. However, on
$map->Create($resourceID, $mapName) something goes wrong and the response is
aborted. I have a very simple error handler in catch(MgException ...) which
is never called (it should echo "exception" and then exit). I know the
GetMessage() method of MgException has changed in 2.2 but I am not using it.
To be on the safe side I also tried catching a regular PHP Exception but
again nothing is being hit - as if the script just totally bombs without
reaching the error handlers. Nothing is being logged in PHP, the Apache
error log simply says "[notice] child pid 3123 exit signal Segmentation
fault (11)".

I tried testing the phpviewersample application but the map frame never
loads - it also reports an 'aborted' error.

I have previously read that the map constructor overload that is used is
important (for older versions at least), these are the relevant parts of
what I'm using:

$user = new MgUserInformation('Anonymous', '')
$siteConnection = new MgSiteConnection()
$siteConnection->Open($user)
$resourceService =
$siteConnection->CreateService(MgServiceType::ResourceService)
$resourceID = new
MgResourceIdentifier('Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition')
$map = new MgMap($siteConnection)
$mapName = $resourceID->GetName()
$map->Create($resourceID, $mapName)   // explodes here

I am not sure where I can look next so any thoughts would be really
appreciated. I installed both FDO and MapGuide using the 2.2 release
binaries. The platform is 64-bit but as all binaries are 32-bit I don't
think that should cause problems. I can use the Site Administrator just
fine.

Thanks.


--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Uncaught-error-on-Map-Create-in-MGOS-2-2-tp4473900p4473900.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list