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

Lowell Filak lfilak@medinaco.org
Tue, 12 Nov 2002 08:32:35 -0500


Okay.
First problem solved.
Now please try adding the -w switch to your script as Puneet has suggested and report what happens.
Lowell F.

The following message was sent by "krung" <krung@cad.go.th> on Tue, 12 Nov 2002 09:18:37 +0700.

> Lowell,
> 
> If I ran at the command line "cat mapserver.log", it showed the error I tend to make in mapfile, e.g. I changed "UNITS KILOMETERS" to "UNITS KILO", it showed that it didn't know "KILO".  If that mapfile worked without error, no new message's in that log file. And with this error-free script run on Apache, it stoped with "Internal Server Error" with no new message in mapserver.log and at the error_log of Apache, it showed only one line "Premature end of script header:/mapserver/testmap.pl". With this error_log file, I'm very sure it printed out only one line of error per access to this script.
> 
> Thanks
> Krung
> 
> ---------- Original Message ----------------------------------
> From: "Lowell Filak"<lfilak@medinaco.org>
> Date:  Mon, 11 Nov 2002 15:25:55 -0500
> 
> >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@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
> >> 
> >> 
>