[Mapserver-users] mapserv4.0 and mygis (mysql)

Bruce Bushby bruce.bushby at wol.co.za
Wed Aug 20 16:40:15 EDT 2003


Hello

Is anybody using mapserv4.0 to request maps from a mysql database? I'm
desperately looking
for some pointers to resolve the following error.

My error: "Premature end of script headers: mapserv, referer:"

I have compiled mapserv --with-mysql=yes, created a database called
mapserver, imported
the map 'roads_n' using Atilla's perl script, shp2mysql.pl. Then I used
"grant all privileges...."
fo the user mapserver. When I do a test 'mysql -h ctech -u
mapserver -pmapserver69' it
works fine and I can "select * from" all the tables. When I try and retrieve
the maps
from mysql using mapserv I get the "Premature...." errors.

Any ideas would be much appreciated!!
Thanks

My setup:
	Redhat8
	Mapserv4.0
	mysql  Ver 11.18 Distrib 3.23.52, for pc-linux-gnu (i686)

This is my 'submit' form which calls the map:
<HTML>

<HEAD>
        <TITLE>
                MapServ
        </TITLE>
</HEAD>

<BODY BGCOLOR=WHITE>
<CENTER>

        <BR>
        <FORM METHOD=GET ACTION=/cgi-bin/mapserv TARGET=framebottom>
        <INPUT TYPE=hidden NAME=map
VALUE=/var/www/html/genmap/mapfile/test.map>
        <INPUT TYPE=hidden NAME=mode VALUE=map>
        <BR>
        <BR>
        <INPUT TYPE=submit VALUE="Display landuse from mysql">
	  <BR>
</CENTER>
</BODY>

</HTML>


This is my mapfile, test.map:
NAME RSA
STATUS on
SIZE 600 600
EXTENT 27.97839342 -25.98889781 28.14165968 -26.13824933
UNITS KILOMETERS
#SHAPEPATH "/var/www/html/genmap/data"
IMAGECOLOR 200 200 200
#DEBUG

PROJECTION
        proj=longlat
        ellps=WGS84
        datum=WGS84
        no_defs
END



WEB
        LOG /tmp/mapserver.log
END


SYMBOL
        NAME 'circle'
        TYPE ELLIPSE
        POINTS 1 1 END
        FILLED TRUE
END
#-----------------------------------------------------

LAYER
        NAME roads_n
        TYPE line
        STATUS default
        CONNECTIONTYPE mygis
        CONNECTION "ctech,mapserver,mapserver69,mapserver:bin:"
        DATA "geometry from roads_n feature use index(turbo), roads_n_bin
geometry"
        #DATA roads_n

        CLASS
                COLOR 0 0 0
        END

END

#-----------------------------------------------------
END





Regards


Bruce Bushby
Cell: +27 82 323 7025
Home: +27 234 3284
E-Mail: bruce.bushby at wol.co.za





More information about the mapserver-users mailing list