TSRMG

php.internals

Oliver Block

19 years ago
Hello, something isn't clear to me: Is php as apache module supposed to work without problems - if compiled as zts - only on apache worker or even on apache prefork? Regards, Oliver

Stanislav Malyshev

19 years ago
> something isn't clear to me: Is php as apache module supposed to work > without problems - if compiled as zts - only on apache worker or even on > apache prefork?
I think if you manage to compile it that way it might work, but I don't really see why you would want to do it - TS build is slower.
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

Oliver Block

19 years ago
I think someone recommended me to compile --with-maintainer-zts, because I was working on some functions within the imap extension. That's the main reason. Regards, Oliver Stanislav Malyshev schrieb:

Scott MacVicar

19 years ago
Writing an extension with maintainer zts enabled is a good way to ensure you remembered to add the needed TSRM stuff. Scott Oliver Block wrote:

Stanislav Malyshev

19 years ago
> Writing an extension with maintainer zts enabled is a good way to ensure > you remembered to add the needed TSRM stuff.
Right, that's a good idea to check extension in TS mode. However, I'd not run TS module in prefork beyond testing.
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

William A. Rowe, Jr.

19 years ago
Stanislav Malyshev wrote:
>> something isn't clear to me: Is php as apache module supposed to work >> without problems - if compiled as zts - only on apache worker or even >> on apache prefork? > > I think if you manage to compile it that way it might work, but I don't > really see why you would want to do it - TS build is slower.
If you want a module loadable under either prefork, or worker, or even perhaps the newer event mpm; you must build zts. Since many OS bundles support multiple MPM's - they are going to build zts. And you are right - wins you nothing (loses you a bit in performance) to run the prefork MPM with zts.

Derick Rethans

19 years ago
On Thu, 5 Jul 2007, William A. Rowe, Jr. wrote:
> Stanislav Malyshev wrote: > >> something isn't clear to me: Is php as apache module supposed to work > >> without problems - if compiled as zts - only on apache worker or even > >> on apache prefork? > > > > I think if you manage to compile it that way it might work, but I don't > > really see why you would want to do it - TS build is slower. > > If you want a module loadable under either prefork, or worker, or even > perhaps the newer event mpm; you must build zts. Since many OS bundles > support multiple MPM's - they are going to build zts. > > And you are right - wins you nothing (loses you a bit in performance) to > run the prefork MPM with zts.
It's not a bit, the performance increase is quite a bit. Seriously, if you distribution is silly enough to give you a TS PHP when you're running apache/prefork, please compile from source! It's likely they also messed up other things. Derick