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