Getting MapServer working (PHP MapScript)

Camden Daily cdaily at GMAIL.COM
Tue May 31 16:18:07 EDT 2005


This code is an example of how to use the builtin mapserver error
messages.  If the script actually DIES on the ms_newMapObj and doesn't
run anything after that, then you need to look into PHP error
messages.

<?
ms_ResetErrorList();

dl("php_mapscript.so");
$map = ms_newMapObj("simple.map");
echo "didn't die";
$img = $map->draw();

$error = ms_GetErrorObj();
while($error AND $error->code != MS_NOERR) {
  printf("Error in %s: %s<br>\n", $error->routine, $error->message);
  $error = $error->next();
}
?>



More information about the mapserver-users mailing list