[mapserver-users] Couldn't run perl mapscript under Apache

Lowell Filak lfilak at medinaco.org
Mon Nov 11 15:25:55 EST 2002


If you run the script at the command line and then immediately do "cat mapserver.log" what does it show?
If you also do "ls -l mapserver.log" what does it show?
Lowell F.

The following message was sent by "krung" <krung at cad.go.th> on Sun, 10 Nov 2002 00:09:08 +0700.

> Hi Lowell, Puneet
> 
> I tried as you told me. If I ran with command line, mapserver.log was created whem error occured. But when run on Apache, mapserver's never created as error occured. (access right with this directory'd set to 777 already) So I checked it at error_log of httpd log file, but it's non-sense to me. It showed only "Premature of script headers: /usr/mapserver/testmap.pl".
> 
> And I tried to change script logic flow as you, Puneet, told me. It's the same error as before (Internal Server Error). 
> 
> Do I have to specially configure when I create mapserver program? Any comments, help, advice would be graceful.
> 
> Thank you
> Krung
> 
> 
> ---------- Original Message ----------------------------------
> From: "Lowell Filak"<lfilak at medinaco.org>
> Date:  Thu, 07 Nov 2002 08:24:06 -0500
> 
> >You can try adding the line noted below and see if a file mapserver.log exists in the current directory and if it reports an error.
> >If the mapserver.log file isn't created then try changing the path of the log file to somewhere writeable by the apache process.
> >HTH
> >Lowell F.
> >
> >The following message was sent by "Krung Saengpole" <krung at cad.go.th> on Thu,  7 Nov 2002 18:45:20 +0700.
> >
> >> Hello all,
> >> 
> >> I had trouble getting perl mapscript run on Apache 1.3.26 under RH 7.2. Mapscript compiled from mapserver 3.6.3. 
> >> 
> >> My script is:
> >> 
> >> #!/usr/bin/perl
> >> use mapscript;
> >> use CGI qw/:standard/;
> >
> >$ENV{MS_ERRORFILE} = "mapserver.log"; <--Try adding this line.
> >
> >> 
> >> print header();
> >> print start_html();
> >> $map = new mapObj('mapfile.map');
> >> $img = $map->draw();  # <---- error took place here
> >> $img->saveImage('file.png', $mapscript::MS_PNG,1,1,0);
> >> ....
> >> ....
> >> 
> >> What I did wrong with this script or anything else? But I could run this script at command line. I'm very new to Linux. I tried to write a script that open database and run under Apache, it had no problem. So, I thought it should not be wrong with Apache configuration. 
> >> 
> >> Thank you in advance.
> >> Krung.
> >
> >
> >




More information about the mapserver-users mailing list