[MS4W-Users] Still trying to understand about thread safety

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Apr 5 09:59:31 EST 2011

On 11-04-04 8:50 PM, Tom Price wrote:
> Bump...
> Is this question more appropriate for the Mapserver list serve?
> --- On *Thu, 3/17/11, Tom Price /<tom_price at yahoo.com>/* wrote:
>     From: Tom Price <tom_price at yahoo.com>
>     Subject: [MS4W-Users] Still trying to understand about thread safety
>     To: "MS4W" <ms4w-users at lists.maptools.org>
>     Date: Thursday, March 17, 2011, 11:36 AM
>     If Mapserver is not thread-safe, then why is Mapscript built with
>     the TS flag set?
>     Should I continue trying to build a NTS version of php_mapscript.dll
>     or should I install the thread safe version of PHP?
>     Thanks in advance.

Hello Tom,

Just to put this email in context for everyone: this question was 
initially asked and answered on the MapServer-users mailing list (see 
thread at: 

Thread safety is also included as an FAQ in the MapServer documentation 

Thread safety and PHP were also recently discussed on the 
MapServer-users mailing list 

That said, yes it is confusing, especially if you are trying to match 
binaries from MS4W with your own custom PHP (in which case you would 
refer to my response in the above ms4w-users thread).  As I note in that 
message, you can always contact me for a custom build if you are running 
into problems with your client's environment (to avoid this TS/NTS issue).

Looking at MapServer's source code, in /mapscript/php3/nmake.opt 
it appears that when you compile php_mapscript.dll the code looks for a 
PHP TS library (in this case php5ts.lib).  In fact that could be your 
answer right there.

Those are my thoughts on your issue.


Jeff McKenna
MapServer Consulting and Training Services

More information about the MS4W-Users mailing list