[maplab-users] phpmapscript error
Zak James
zak-ms at hoppsan.org
Mon Jun 14 15:59:53 EDT 2004
Are the paths in your mapfile for IMAGEPATH and IMAGEURL set to
existing directories, writable by your webserver?
zak
On Jun 9, 2004, at 8:30 AM, jive wrote:
> Hi,
> I have compile mapserver 4.0.1 and phpmapscript succesful with vc6
> and install on my server(windows 2003) well.
> I use phpmapscript to get map,it works fine,but when I use
> functions to get legend and scalebar,it is fail,and its error log
> is PHP "Fatal error: Call to a member function on a non-object in
> c:\apache\htdocs\test_draw_map.phtml on line 57".
> What is wrong with it?
> Here is my php code:
> <HTML>
> <BODY BGCOLOR="#CCCCCC">
> <CENTER>
> <H1>PHP/MapScript module test</H1>
> <P>
> <?php
> $map_path="C:/maplab/tutorial/";
> $map = ms_newMapObj($map_path."mymap.map");
>
> $img = $map->draw();
> $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
> printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $map->width,
> $map->height);
>
> $img = $map->drawLegend();
> $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
> printf("<P><IMG SRC=%s>\n", $url);
>
> $img = $map->drawScaleBar();
> $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
> printf("<P><IMG SRC=%s>\n", $url);
> ?>
> </BODY>
> </HTML>
> --
> Jive Chang
> Project Manager
> AINOTECH Inc.
> E-mail:jive at aino.com.tw
> TEL:+886-2-2553-3652
> FAX:+886-2-2553-2647
> 7F, No. 100, Sec. 3, Chung Hsiao East Road, Taipei 106, Taiwan,
> R.O.C._______________________________________________
> Maplab-users mailing list
> Maplab-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/maplab-users
More information about the Maplab-users
mailing list