[mapserver-users] php fails on MS4W and Apache
Zhao Ying (CDU)
Ying.Zhao1 at cn.flextronics.com
Mon Jun 23 05:11:02 EDT 2008
I'm trying to test my PHP MapScript environment on MS4W.
Unfortunately, each time I run the following php file on the apache
server within MS4W, a same
error message is always thrown:
-- Error Message:
Fatal error: Call to undefined function ms_newMapObj() in
C:\ms4w\Apache\htdocs\phpms_hello.php on line 7
-- PHP file: phpms_hello.php
This example is from chapter8, book <Apress Beginning MapServer Open
Source GIS Development Aug 2005>
however, according to the author, this example is expected to be run a
Linux version mapserver (I guess so),
so I'm under the assumption that all configuration procedures described
in this book before running this example
won't work for MS4W.
// 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/test2/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="/tmp/<?php echo $image_name; ?>">
Did I miss some configurations for MS4W to work with php or something?
The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mapserver-users