PHP/MapScript DSO

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Fri Jun 1 17:36:08 EDT 2007


Gregor Mosheh wrote:
>> I know that there are still many sources pointing to the fact that you 
>> must
>> run PHP as a CGI for MapScript. I have also seen people talking about
>> running mapscript successfully with PHP as a DSO.
> 
> Yeah, I've been asking off and on about this for the last 2 years. I 
> always see one or two "works for me" especially under Windows, and three 
> or four "no way" So I dunno... I've not been brave enough to try it on 
> our production systems.
> 
> 
>  > Can anyone confirm they
>> are running under PHP DSO, and how did you get MapServer/MapScript to
>> compile under DSO? Thanks.
> 
> Mapserver/Mapscript just compiles as you would for the PHP CGI: point to 
> the PHP source tree and it builds php_mapscript.so
> 

The definitive answer to this question probably needs to come from DM 
Solutions et al, as they are the maintainers of PHP mapscript.

The problem is a nutshell is this:

You can build as a DSO and it will work ... well sort of, but not 
really.  If you run some hits against it they will work, but the root 
problem is that mapserver and hence mapscript has not resolved all the 
thread-safety issues yet. It is TONS better than it was a few years ago, 
but still has some problems. So when you put your DSO under a little 
load and get some multiple requests running it starts to trash the 
various threads depending on what you are doing.

There are a lot of things that are currently getting done to improve 
things in the code, and it might be getting to the point that if you 
test your specific application you might determine that you don't hit 
any of those issues. But then again your testing might have just missed 
those issues or your next application might fall flat on its face.

Anyway, you see the problem. And as this is a constantly changing 
problem with all the code development, you probably need to ask 
occasionally what the status is on this. I know I have to ask every 6 
months or so to see if it has changed.

-Steve W.



More information about the mapserver-users mailing list