[Mapserver-dev] OT: RH8, Apache2, cgi-bin strangeness
woodbri at swoodbridge.com
woodbri at swoodbridge.com
Thu Mar 13 22:48:26 EST 2003
Yes the logs had the same helpful message :(
But I did figure it out (my bad), Apache 2 puts the QUERY_STRING on
the cgi-bin command line and my executable works either in command
line mode for to make it callable from scripts OR in cgi-bin mode
where it spits out appropriate headers. I set the mode based on (argc
< 1) which doesn't work under apache 2, so I added a check to see if
getenv("REQUEST_METHOD") == NULL
It worked in the shell script because the shell ate the argvs and
they were not passed on to geo.
Thank you for noodling over my problem. Hopefully this will help
someone else to not waste an evening.
-Steve W.
On 13 Mar 2003 at 22:19, Daniel Morissette wrote:
> Did you check your error_log?
>
> woodbri at swoodbridge.com wrote:
> >
> > Hi guys,
> >
> > I have run into a very strange problem on RH 8.0 with with apache 2
> > I have a C program (my geocoder) that runs fine in a user shell but
> > generates:
> >
> > Server error!
> > The server encountered an internal error and was unable to complete
> > your request. Error message: Premature end of script headers: geo If
> > you think this is a server error, please contact the webmaster Error
> > 500
> >
> > when run a via the browser. But here is the strangeness if I put the
> > program in a shell script it does not generate any errors. Like this
> >
> > --------------- geo2 ---------
> > #!/bin/sh
> > geo
> >
> > then calling
> >
> > http://host/cgi-bin/geo?ZIP=76119&FUZZY=on&DEBUG=1
> > http://host/cgi-bin/geo2?ZIP=76119&FUZZY=on&DEBUG=1
> >
> > the first error out the second runs fine!
> >
> > Oh and the first runs fine under apache 1.3.
> >
> > Anybody got a clue on this???
> >
> > -Steve W.
> > _______________________________________________
> > Mapserver-dev mailing list
> > Mapserver-dev at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
>
> --
> ------------------------------------------------------------
> Daniel Morissette morissette at dmsolutions.ca
> DM Solutions Group http://www.dmsolutions.ca/
> ------------------------------------------------------------
>
More information about the mapserver-dev
mailing list