[ms4w-users] php file error

Aneela anla at live.ca
Tue Mar 10 10:32:52 EST 2009

Hello everyone! In ms4w  5.2.1, I created & saved the following file as phpms_hello.php
   // Create a unique image name every time through
   $image_name = sprintf("phpms_hello%0.6d",rand(0,999999)).".jpg";
   // 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
<head><title>PHP Mapscript Hello World</title></head>
     <form action="phpms_hello.php"  method="POST">
         <input  type="image" name="img"
                   src="/ms_tmp/<?php echo $image_name; ?>">
When I run this file in the browser,  I get the following error message, 
Fatal error: Call to undefined function ms_newMapObj() in C:\ms4w\Apache\htdocs\phpms_hello.php on line 5
N.B: The hello.map file works through an html file. Can anyone help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20090310/e826eec2/attachment.htm 

More information about the ms4w-users mailing list