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..




_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to