# ZTS issues

- Thread: https://externals.io/message/5511
- Original archive: https://news-web.php.net/php.internals/5511
- Started by Michael Sisolak on 2003-11-18T04:06:58+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #5511 — Michael Sisolak — 2003-11-18T04:06:58+00:00

URL: https://externals.io/message/5511#5511

> I have been looking at the IIS isapi issues and came up with the
> following patch:
>
> http://www.ctindustries.net/patches/zts-php5.diff.txt

Rob,

I've done some work in the past on ISAPI threading issues (although I
by no means claim to understand how all the ZTS stuff works).  Can you
explain why you added the calls to ts_free_thread() after the
DLL_PROCESS_ATTACH and then each call to HttpExtensionProc()?  In both
cases the actual thread under IIS does continue to exist and can be
called on again when a new HTTP request arrives at the server.  It
would appear to me that this change would be causes PHP to have to
reinitialize with each request.  Is there a specific issue that you
were able to fix with this change?

Michael Sisolak
msisolak@yahoo.com


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---

## #5512 — Andi Gutmans — 2003-11-18T08:48:44+00:00

URL: https://externals.io/message/5511#5512 · In reply to: #5511

At 08:06 PM 11/17/2003 -0800, Michael Sisolak wrote:
> > […]
>
>Rob,
>
>I've done some work in the past on ISAPI threading issues (although I
>by no means claim to understand how all the ZTS stuff works).  Can you
>explain why you added the calls to ts_free_thread() after the
>DLL_PROCESS_ATTACH and then each call to HttpExtensionProc()?  In both
>cases the actual thread under IIS does continue to exist and can be
>called on again when a new HTTP request arrives at the server.  It
>would appear to me that this change would be causes PHP to have to
>reinitialize with each request.  Is there a specific issue that you
>were able to fix with this change?

Rob,

Also, how sure are you about this patch? What tool did you use for 
debugging. The code changes you made change some of the most fragile code 
in PHP so I want to be absolutely sure it's OK. I'm going to run it by Zeev 
who knows this part of the code the best.

Andi

---

## #5518 — Zeev Suraski — 2003-11-18T12:32:22+00:00

URL: https://externals.io/message/5511#5518 · In reply to: #5511

At 06:06 18/11/2003, Michael Sisolak wrote:
> > […]
>
>Rob,
>
>I've done some work in the past on ISAPI threading issues (although I
>by no means claim to understand how all the ZTS stuff works).  Can you
>explain why you added the calls to ts_free_thread() after the
>DLL_PROCESS_ATTACH and then each call to HttpExtensionProc()?  In both
>cases the actual thread under IIS does continue to exist and can be
>called on again when a new HTTP request arrives at the server.  It
>would appear to me that this change would be causes PHP to have to
>reinitialize with each request.  Is there a specific issue that you
>were able to fix with this change?

Same questions here...  The extra calls to ts_free_thread() seem 
bogus.  Not sure yet about the other changes although they probably make 
more sense - I never made too much effort to ensure that the cleanup of a 
thread is very complete...

Zeev
