I have found that a manually installed (compiled) PHP 5.6.34 on Ubuntu Server 16.04 has automatically enabled thread safety.
The source is downloaded from php.net. Here is the build commands I have used:
$ ./configure --prefix=/opt/php56 --disable-posix --enable-soap --enable-mbstring --enable-mbregex --with-gd --with-jpeg-dir="/usr/lib/x86_64-linux-gnu" --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-static --enable-wddx --enable-shmop --with-curl --with-mcrypt --with-iconv --with-pspell --with-zlib --with-freetype-dir=/usr --enable-gd-native-ttf --enable-gd-jis-conv --with-openssl --with-pdo-mysql --with-gettext=/usr --with-bz2=/usr --with-recode=/usr --with-apxs2=/etc/apache2/bin/apxs --with-fpm-user=www-data --with-fpm-group=www-data --enable-fpm
$ make
$ make install
I have tried with --disable-zts
, no change occurred.
How can I compile with thread safety disabled?
And one side but still important question - is there a way to check if extension is thread safe?
Thank you!