[Mapserver-users] mapserv doesn't work

=?gb2312?q?Chen=20Fu?= novalet at yahoo.com.cn
Fri Jun 20 23:10:02 EDT 2003


Vincent:
  I recheck the mapserv in apache cgi-bin is the
mapserv i just compiled. If i change its name, the
brower will say object not found.

  then i try 
http://localhost/cgi-bin/mapserv?map=/var/www/html/itasca/itasca.map&mode=map
  the problem remain, message is 

     Error message:
Premature end of script headers: mapserv 

  It seems something wrong in my platform, but i just
can't find out :<
  Just a wonder. Why not mapserver build a easy to
used rpm package for us newbies to play?

 --- Vincent Schut <schut at sarvision.com> µÄÕýÎÄ£º>
Chen,
> 
> it is very strange that from the commandline mapserv
> works, but not from your 
> browser. Your server should simply start mapserv and
> stream the output to 
> your browser... Are you sure that you have the right
> mapserv executable in 
> the right cgi-bin directory (sorry for the obvious
> question, don't mean to 
> offend... :-)) ? But you won't be the first one to
> copy your new mapserv in 
> an old cgi-bin dir that is not used anymore... (did
> it once myself).
> Try using not only localhost/cgi-bin/mapserv, but
> add the values you added as 
> querystring at the commandline
> (http:/localhost/cgi-bin/mapserv 
> map=/../../map.map&mode=map
> What do you get then?
> BTW you don't need php to use mapserver, I was wrong
> in assuming that you used 
> php... Mapserver as cgi is just as powerfull as the
> php/mapscript version, I 
> think. At least powerfull enough for this debugging.
> 
> Good luck!
> Vincent.
> On Friday 20 June 2003 16:05, Chen Fu wrote:
> > Vincent:
> > Thank you for your reponse!
> > My mapserv works in "Query...", it print out a lot
> of
> > ascii as you said. I think it is the data of the
> > generated image.
> > Then what should i do? Should i config something
> like
> > php? My project doesn't use php up to now. But it
> will
> > be accepted if mapserv has to work with php lib.
> >
> >  --- Vincent Schut <schut at sarvision.com> µÄÕýÎÄ£º>
> > Chen,
> >
> > > The error you get is a very generic error
> generated
> > > by php I think. To find
> > > out more about what goes wrong, you should at
> least
> > > run mapserver from the
> > > command prompt, and prefereable thourgh a
> debugger.
> > > To run it from the command prompt, type (in the
> dir
> > > where the mapserv
> > > executable is):
> > > ./mapserv
> >
> >
>
"QUERY_STRING=map=/var/mapserver/mapfiles/province2.map&mode=map"
> >
> > > (of course fill in your own mapfile/path and
> > > eventual other parameters. I
> > > think you need to specify at least map and mode.
> > > This example prints the
> > > image data to stdout, so you will see your png
> or
> > > gif or whatever scrolling
> > > as ascii on you terminal :-)
> > > But probably you will see an error message
> instead
> > > of image data.
> > >
> > > If it is still very generic, like a segmentation
> > > fault, you should use a
> > > debugger.
> > > To run mapserv from the debugger, do the
> following:
> > > make sure you have gdb (the gnu debugger) and
> type:
> > > gdb mapserv
> > > run
> >
> >
>
"QUERY_STRING=map=/var/mapserver/mapfiles/province2.map&mode=map"
> >
> > > and after the error, type:
> > > backtrace
> > > This will show you in which function mapserv (or
> a
> > > library) segfaulted.
> > > Maybe than you will know what to do. Otherwise,
> send
> > > your experiences and the
> > > mapserv and  debugger output to this list and
> I'm
> > > sure you will get more
> > > help.
> > >
> > > Cheers,
> > > Vincent Schut.
> > >
> > > On Friday 20 June 2003 09:12, Chen Fu wrote:
> > > > Till£º
> > > >    My linux box is base on redhat8. the make
> > >
> > > generate
> > >
> > > > some warning but no error. the mapserv is
> 375445
> > > > bytes. I think it is much smaller than the one
> i
> > >
> > > used
> > >
> > > > in win2k. But i config it with gd lib only.
> > > >    if i type "./mapserv" it will show
> > > > "
> > > > This script can only be used to decode form
> > >
> > > results
> > >
> > > > and
> > > > should be initiated as a CGI process via a
> httpd
> > > > server.
> > > > "
> > > > Is it mean the file is a validate executable?
> > >
> > > shp2img
> > >
> > > > generated in the same procession work very
> nice.
> > > >
> > > > I search the archive for that message before i
> > >
> > > post it
> > >
> > > > here. But most i found is related to php or
> some
> > >
> > > other
> > >
> > > > thing. Because i am a newbie in compiling
> > >
> > > mapserver in
> > >
> > > > linux, so i select the cleanest way, use only
> gd
> > >
> > > lib.
> > >
> > > > But still get into trouble, sigh...
> > > >
> > > >  --- Till Adams <adams at terrestris.de>
> µÄÕýÎÄ£º>
> > >
> > > Dear
> > >
> > > > Cheng,
> > > >
> > > > > "premature end of script" is an error which
> > >
> > > occurs,
> > >
> > > > > when the compile
> > > > > process was broken up: so while compiling,
> the
> > > > > "mapserv" was written but
> > > > > not finished. Which linux system do you use?
> Did
> > >
> > > you
> > >
> > > > > get an error
> > > > > message when compiling? Try the mailing list
> > >
> > > archive
> > >
> > > > > searching for
> > > > > contributions fitting to your error message.
> > > > >
> > > > > Good luck,
> > > > > Till
> > > > >
> > > > > Chen Fu schrieb:
> > > > > > Hi!
> > > > > > This is my first time to compile mapserver
> in
> > > > >
> > > > > linux.
> > > > >
> > > > > > But I use mapserver in win2k for a long
> time.
> > > > > > First download gd-2.0.15, make and install
> it.
> > > > > > Then i download mapserver4.0b, make it and
> > >
> > > copy
> > >
> > > > > > mapserv to cgi-bin.
> 
=== message truncated === 

=====
Remote Scensing Satellite Ground Station
Chinese Academy of Science

_________________________________________________________
Do You Yahoo!? 
ÍøÁµµÄÚ¹ÊÍ£ºÕæÇ黹ÊÇ·Å×Ý£¿
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove



More information about the mapserver-users mailing list