<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>For the record, a nice little starter php script is included in ms4w at: /Apache/htdocs/quickmap.php</div><div><br></div><div><br></div><div>--jeff</div><div><br></div><div><br></div><div><br></div><br><div><div>On 29-May-08, at 10:02 AM, Νίκος Παπαδάκης wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div bgcolor="#ffffff" text="#000000"> Hello.<br> I try to use pamscript with php by running the following file but i receive the following error message:<br> <b>Fatal error</b>: Call to undefined function ms_newMapObj() in <b>C:\ms4w\Apache\htdocs\phpms_hello.php</b> on line <b>5.</b><br> <br> <br> File name : phpms_hello.php in C:\ms4w\Apache\htdocs<br> <br> <?php<br> // Create a unique image name every time through<br> $image_name = sprintf("phpms-hello%0.6d",rand(0,999999)).".png";<br> // Create a new instance of a map object<br> $map=ms_newMapObj("/ms4w/Apache/htdocs/hello.map");<br> // Create an image of the map and save it to disk<br> $image=$map->draw();<br> $image->saveImage("/ms4w/Apache/htdocs/tmp/".$image_name);<br> ?><br> <html><br> <head><title>PHP MapScript Hello World</title></head><br> <body><br> <form action="phpms_hello.php" method="POST"><br> <input type="image" name="img" <br> src="/tmp/<?php echo $image_name; ?>"><br> </form><br> </body><br> </html><br> <br> <br> I run mapserver version 2.2.7 on Windows xp and when i call <a class="moz-txt-link-freetext" href="http://localhost">http://localhost</a> i can verify that mapscript is installed correctly.<br> I suppose i have done something wrong with my configuration..<br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>---</div><div>Jeff McKenna</div><div>FOSS4G Consulting and Training Services</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><a href="http://www.gatewaygeomatics.com/">http://www.gatewaygeomatics.com/</a></div></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>