CGI MapServer 4.4.1 and php 5.0.2 vs 5.0.2/3

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Mon Jan 10 09:45:21 EST 2005


Steve Hall wrote:
> Hi All,
>
> I'm having a problem with the CGI MapServer.  I'm using MapServer 4.4.1 and
> when I compile --with-php set to the source tree for PHP5.0.1 then all is
> well and PHP/MapScript and CGI "mapserv" both work fine.  However if I
> compile against a 5.0.2 (or 5.0.3) PHP source tree then although my
> PHP/MapScript seems to work ok, my CGI "mapserv" is having massive problems
> which i'm finding hard to track down.
>
> Basically the only thing that seems to work is
> "http://my-server/cgi-bin/mapserv" and that's it (I get the "QUERY_STRING is
> set, but empty." message so all paths & env etc are OK I presume). As soon
> as I try to do something "real" it fails and I get "Premature end of script
> headers" in the Apache (1.3.31) error log.
>
> Can anyone help me out here - or give me some hints as to where to look? At
> the moment I'm not sure if its a MapServer problem or a PHP one.  It seems
> weird to me that PHP/MapScript works fine though and its the CGI MapServer
> that's having problems?!!
>

That's an odd one for sure. An easy workaround would be to stick to the
mapserv CGI that works and forget about the broken one. There is no link
at all between the mapserv CGI and your PHP at runtime, so you can use
any mapserv CGI with any PHP on your server.

Now, it would still be good to know why this happens and fix the issue
if it's in MapServer. Are your two PHP source trees configured and
compiled with exactly the same options? Perhaps you could do an 'ldd
mapserv' with both versions and see if different libraries end up being
picked up. The real way to figure this out would be to use gdb and see
where/why the crash happens. If others can confirm that they get the
same problems with PHP 5.0.3 then please create a bug with your
configuration information (PHP and mapserver configure options, OS,
etc.) and I'll see if I can reproduce it.

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list