From: Venkat Raman Don on
Hi Bruce,

This means you have built a Thread safe version of the extension and trying to load it with Non Thread Safe version of PHP which is not valid. Please build non thread safe version of extension. I believe --disable-zts is the switch that will do the trick for building the non-thread safe extension.

Thanks,
Don.

-----Original Message-----
From: Bruce M. Axtens [mailto:bruce.axtens(a)gmail.com]
Sent: Monday, July 19, 2010 7:28 AM
To: php-windows(a)lists.php.net
Subject: [PHP-WIN] Problem writing PHP extensions for Windows

I'm trying to build PHP extensions on Windows

When I run my DLLs I get errors like this:
Module compiled with build ID=API20090626,TS,VC9
PHP compiled with build ID=API20090626,NTS,VC9

The source package that I downloaded from php.net seems to default to threadsafe, but I've installed a nonTS PHP (the recommended action apparently when running under FastCGI on IIS7.)

How do I get nonTS sources, or what do I have to do to what I have to make them appear nonTS so that Visual Studio 2008 creates nonTS binaries?

Kind regards,
Bruce.

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


From: "Bruce M. Axtens" on
Venkat Raman Don wrote:
> This means you have built a Thread safe version of the extension and trying to load it with Non Thread Safe version of PHP which is not valid.
Yes, that is true. My question has been from the beginning: how to make
the extension Non Thread Safe?
> Please build non thread safe version of extension.
How?
> I believe --disable-zts is the switch that will do the trick for building the non-thread safe extension.
>
This has been tried, twice, without success. I think you will find that
--disable-zts has more to do with building PHP than it has with building
extensions.

Kind regards,
Bruce.

From: Venkat Raman Don on
I meant your PHP build environment should be configured to disable TS. So this means the PHP build environment should create a NTS build of PHP. If you are making changes to the configuration, it is very important to re-build configuration.

So run first,
cscript.exe win32\build\buildconf.js

then do
configure.js [all options used to build NTS PHP] --enable-<extension_name>

now say,
nmake

This should produce NTS version of extension as well as PHP.

Thanks,
Don.

-----Original Message-----
From: Bruce M. Axtens [mailto:bruce.axtens(a)gmail.com]
Sent: Monday, July 19, 2010 9:10 AM
To: Venkat Raman Don
Cc: php-windows(a)lists.php.net
Subject: Re: [PHP-WIN] Problem writing PHP extensions for Windows

Venkat Raman Don wrote:
> This means you have built a Thread safe version of the extension and trying to load it with Non Thread Safe version of PHP which is not valid.
Yes, that is true. My question has been from the beginning: how to make the extension Non Thread Safe?
> Please build non thread safe version of extension.
How?
> I believe --disable-zts is the switch that will do the trick for building the non-thread safe extension.
>
This has been tried, twice, without success. I think you will find that --disable-zts has more to do with building PHP than it has with building extensions.

Kind regards,
Bruce.


From: Pierre Joye on
hi,


On Mon, Jul 19, 2010 at 4:28 PM, Bruce M. Axtens

> How do I get nonTS sources, or what do I have to do to what I have to make
> them appear nonTS so that Visual Studio 2008 creates nonTS binaries?

The source are not TS or NTS but only the binaries. Use the
--disable-zts configure option to build the NTS binaries.

To build PHP or PHP extension, please follow these instructions:

http://wiki.php.net/internals/windows/stepbystepbuild

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org