[mapserver-users] Fatal error: Call to undefined function ms_newMapObj() in.........

Νίκος Παπαδάκης nipapada at gmail.com
Thu May 29 10:02:21 EDT 2008


Hello.
I try to use pamscript with php by running the following file but i 
receive the following error message:
*Fatal error*: Call to undefined function ms_newMapObj() in 
*C:\ms4w\Apache\htdocs\phpms_hello.php* on line *5.*


File name : phpms_hello.php in C:\ms4w\Apache\htdocs

<?php
  // Create a unique image name every time through
  $image_name = sprintf("phpms-hello%0.6d",rand(0,999999)).".png";
  // Create a new instance of a map object
  $map=ms_newMapObj("/ms4w/Apache/htdocs/hello.map");
  // Create an image of the map and save it to disk
  $image=$map->draw();
  $image->saveImage("/ms4w/Apache/htdocs/tmp/".$image_name);
?>
<html>
<head><title>PHP MapScript Hello World</title></head>
<body>
  <form action="phpms_hello.php" method="POST">
    <input type="image" name="img"
          src="/tmp/<?php echo $image_name; ?>">
  </form>
</body>
</html>


I run mapserver version 2.2.7 on Windows xp and when i call 
http://localhost i can verify that mapscript is installed correctly.
I suppose i have done something wrong with my configuration..




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080529/929afde1/attachment.html


More information about the mapserver-users mailing list