Paul Erdos
Paul Erdos

Reputation: 1375

How to disable thread safety in PHP?

I am using some software that requires me to have thread safety disabled. I am working on a Windows server. From what I've read elsewhere, I can't just configure this in the .ini file. Is this true? If so, how would I compile it so that thread safety is turned off?

Upvotes: 6

Views: 22810

Answers (4)

ydk2
ydk2

Reputation: 92

It is --disable-maintainer-zts command. May try --disable-posix-threads to.

Upvotes: 2

Tonismar Bernardo
Tonismar Bernardo

Reputation: 11

You can download the last version of Zend Optimizer which have the thread safety on http://downloads.zend.com/optimizer/3.3.0/ZendOptimizer-3.3.0-linux-glibc23-x86_64.tar.gz

Upvotes: 1

Artefacto
Artefacto

Reputation: 97805

You have to compile PHP with ZTS disabled (compile flag --disable-zts) or download binaries with ZTS disabled.

This won't work properly in some webservers, namely those which process several PHP scripts simultaneously in the same process.

Upvotes: 8

Gordon
Gordon

Reputation: 316939

You can download compiled non-thread-safe binaries of PHP for Windows from

Upvotes: 3

Related Questions