Problem writing PHP extensions for Windows
Problem writing PHP extensions for Windows
am 19.07.2010 16:28:05 von axtens
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
RE: Problem writing PHP extensions for Windows
am 19.07.2010 16:30:33 von Keith Davis
What extensions are you trying to build?
Keith Davis (214) 906-5183
-----Original Message-----
From: Bruce M. Axtens [mailto:bruce.axtens@gmail.com]
Sent: Monday, July 19, 2010 9:28 AM
To: php-windows@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=3DAPI20090626,TS,VC9
PHP compiled with build ID=3DAPI20090626,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
This message (including any attachments) may contain confidential or otherwi=
se privileged information and is intended only for the individual(s) to whic=
h it is addressed. If you are not the named addressee you should not dissemi=
nate, distribute or copy this e-mail. Please notify the sender immediately b=
y e-mail if you have received this e-mail by mistake and delete this e-mail =
from your system. E-mail transmission cannot be guaranteed to be secured or =
error-free as information could be intercepted, corrupted, lost, destroyed, =
arrive late or incomplete, or contain viruses. The sender therefore does not=
accept liability for any errors or omissions in the contents of this messag=
e or that arise as a result of e-mail transmission. If verification is requi=
red please request a hard-copy version from the sender.
www.pridedallas.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem writing PHP extensions for Windows
am 19.07.2010 16:37:18 von axtens
Keith Davis wrote:
> What extensions are you trying to build?
>
The one listed here
http://netindonesia.net/blogs/risman/archive/2008/06/15/part -2-writing-php-extension.aspx
(modified slightly from the original to compensate for the nonTS
situation) and
http://www.talkphp.com/vbarticles.php?do=article&articleid=4 9&title=creating-custom-php-extensions
(again with the nonTS in mind).
I'm heading toward big and better things, but at the moment am just
trying to get a proof of concept working.
Bruce.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Problem writing PHP extensions for Windows
am 19.07.2010 16:45:56 von Keith Davis
Are writing your own extension? If you just want compile someone else's
source, like from PEAR/PECL, you can just follow this:
http://wiki.php.net/internals/windows/stepbystepbuild
I believe you can do it the way you are trying, and I'm about to find
out, because, although I've followed those instructions I'm pointing you
to, I've got an extension (pdo_informix) that won't compile correctly.
Keith Davis (214) 906-5183
-----Original Message-----
From: Bruce M. Axtens [mailto:bruce.axtens@gmail.com]
Sent: Monday, July 19, 2010 9:37 AM
To: Keith Davis
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Problem writing PHP extensions for Windows
Keith Davis wrote:
> What extensions are you trying to build?
>
The one listed here
http://netindonesia.net/blogs/risman/archive/2008/06/15/part -2-writing-p
hp-extension.aspx
(modified slightly from the original to compensate for the nonTS
situation) and
http://www.talkphp.com/vbarticles.php?do=3Darticle&articleid =3D49&title=3Dcr=
ea
ting-custom-php-extensions
re
ating-custom-php-extensions>
(again with the nonTS in mind).
I'm heading toward big and better things, but at the moment am just
trying to get a proof of concept working.
Bruce.
This message (including any attachments) may contain confidential or otherwi=
se privileged information and is intended only for the individual(s) to whic=
h it is addressed. If you are not the named addressee you should not dissemi=
nate, distribute or copy this e-mail. Please notify the sender immediately b=
y e-mail if you have received this e-mail by mistake and delete this e-mail =
from your system. E-mail transmission cannot be guaranteed to be secured or =
error-free as information could be intercepted, corrupted, lost, destroyed, =
arrive late or incomplete, or contain viruses. The sender therefore does not=
accept liability for any errors or omissions in the contents of this messag=
e or that arise as a result of e-mail transmission. If verification is requi=
red please request a hard-copy version from the sender.
www.pridedallas.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem writing PHP extensions for Windows
am 19.07.2010 17:07:33 von Richard Quadling
On 19 July 2010 15:28, Bruce M. Axtens wrote:
> I'm trying to build PHP extensions on Windows
>
> When I run my DLLs I get errors like this:
> Â Module compiled with build ID=3DAPI20090626,TS,VC9
> Â PHP Â Â compiled with build ID=3DAPI20090626,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 mak=
e
> them appear nonTS so that Visual Studio 2008 creates nonTS binaries?
>
> Kind regards,
> Bruce.
What is your configure line?
Make sure you have --disable-zts in it to produce NonThreadSafe (nts) versi=
ons.
Richard.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Problem writing PHP extensions for Windows
am 19.07.2010 18:05:50 von Venkat Raman Don
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@gmail.com]=20
Sent: Monday, July 19, 2010 7:28 AM
To: php-windows@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=3DAPI20090626,TS,VC9
PHP compiled with build ID=3DAPI20090626,NTS,VC9
The source package that I downloaded from php.net seems to default to threa=
dsafe, but I've installed a nonTS PHP (the recommended action apparently wh=
en 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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem writing PHP extensions for Windows
am 19.07.2010 18:10:07 von axtens
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.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Problem writing PHP extensions for Windows
am 19.07.2010 18:57:26 von Venkat Raman Don
I meant your PHP build environment should be configured to disable TS. So t=
his means the PHP build environment should create a NTS build of PHP. If yo=
u 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-
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@gmail.com]=20
Sent: Monday, July 19, 2010 9:10 AM
To: Venkat Raman Don
Cc: php-windows@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 tryi=
ng 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.
> =20
This has been tried, twice, without success. I think you will find that --d=
isable-zts has more to do with building PHP than it has with building exten=
sions.
Kind regards,
Bruce.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem writing PHP extensions for Windows
am 20.07.2010 10:22:28 von Pierre Joye
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php