views:

117

answers:

1

How I get the non-threadsafe source for PHP? The only download link I found on windows.php.net/download was http://windows.php.net/downloads/releases/php-5.3.2-src.zip and that appears to be the threadsafe code --- or is there some way of telling the source that it's actually non-threadsafe?

I have tried putting --disable-zts on the commandline for configure.bat but that doesn't seem to make the source any less threadsafe.

+1  A: 

There is only one version of the source, that can be compiled with, or without, thread safety : thread safety is enabled/disabled depending on some options, like you guessed.

In theory, quoting page 19 of the book Extending and Embedding PHP :

A normal PHP build has Thread safety turned of by default and only enables it if the SAPI being built is known to require thread safety, or if thread safety is explicitly turned on by a ./configure switch.

So, are you sure that you should try to disable thread safety ?
Considering it's enabled "when needed", I don't think you should -- not even sure it's possible.

Pascal MARTIN
Given the last paragraph in the article at [Difference between PHP thread safe and non thread safe binaries](http://www.iis-aid.com/articles/my_word/difference_between_php_thread_safe_and_non_thread_safe_binaries), yes, as I have PHP running under FastCGI.
boost
I've edited my post, after giving some additional thoughts to the matter : in theory, thread safety should automatically be disabled, if you are building PHP for a SAPI that doesn't require it.
Pascal MARTIN
Also, I'm trying to build a PHP extension but I keep running into a problem: the module says it's threadsafe and PHP says it isn't so it won't run my module. Please see the [related question](http://stackoverflow.com/questions/3271798/how-should-i-understand-these-php-errors)
boost