Problem with PHP MapScript Wrappers for WxS Services

Ben Tuttle funkbucket at GMAIL.COM
Tue Nov 28 19:22:03 EST 2006


I wanted to add one more thing to this. I spent some time today trying
to decide on how to go about working around this issue. In php the
following seems to work quite nicely:

reset($HTTP_SERVER_VARS);
while (list ($key, $val) = each ($HTTP_SERVER_VARS)) {
    putenv("$key=$val");
};

After executing this block loadparams seems to function as expected.
Just another option on how to work with the wxs mapscript.

> Folks,
>
> In follow up on this I have come to a momentus discovery.  Not all web
> application are cgi based!
>
> Yes, it's hard to imagine, but it's true.
>
> Not entirely surprisingly when using mod_php (and presumably all the other
> non cgi environments) the cgi environment variables do not get set.  And
> worse, the loadParams() which expects to be used in a cgi enviroment just
> calls exit() after any failure, taking down the whole web server
> instance (or at least the thread for that request) without returning anything
> useful.
>
> It seems that in non-cgi environments folks wanting to use the WxS services
> will need to parse the request using mechanisms other than loadParams(), and
> populate the keyword/value pairs in the OWSRequest object manually.
>
> I have updated the WxS services howto with a note about this, and also will
> keep the bug report open as a place to consider ways of passing in the url
> to loadParams() for 5.0.
>
>    http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1975
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>



More information about the mapserver-users mailing list