Bug #77170 [Opn->Nab]: Thread safety is always enabled

From: Date: Tue, 20 Apr 2021 13:18:03 +0000
Subject: Bug #77170 [Opn->Nab]: Thread safety is always enabled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233528@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77170&edit=1

 ID:                 77170
 Updated by:         cmb@php.net
 Reported by:        mimipim at abv dot bg
 Summary:            Thread safety is always enabled
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            *Compile Issues
 Operating System:   Ubuntu 16.04
 PHP Version:        7.1.24
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Thread safety is disabled by default (on non Windows systems).  It
is not implicitely enabled, if you build with apache2handler
support for an Apache which has been build as prefork MPM, what is
the recommended setup anyway[1].  I don't see that a warning about
an implicitly enabled thread-safety would be really helpful.

[1] <https://www.php.net/manual/en/install.unix.apache2.php>


Previous Comments:
------------------------------------------------------------------------
[2018-11-19 13:29:56] mimipim at abv dot bg

I found it is because of the with-apxs2 configuration. I suggest a bold warning to be generated at
the end of configuration if not an error during such conditions where one option enables the thread
safety and other disables it and vice verse.

------------------------------------------------------------------------
[2018-11-17 22:45:31] mimipim at abv dot bg

Description:
------------
It seems in a any specific environment PHP can not be compiled with thread safety disabled.

Test script:
---------------
./configure --prefix=/opt/php71 --disable-maintainer-zts --disable-posix --enable-soap
--enable-mbstring --enable-mbregex --with-jpeg-dir="/opt/jibjpeg-turbo/1.5.2" --with-gd
--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
sudo make install


/opt/php71/bin/php -i | grep Thread
Thread Safety => enabled

./configure --help | grep thread
--enable-maintainer-zts Enable thread safety - for code maintainers only!!
--with-tsrm-pthreads Use POSIX threads (default)

./configure --help | grep posix
--disable-posix Disable POSIX-like functions

I tried the with the addition of --disable-maintainer-zts --disable-posix, it still builds with
Thread Safety => enabled

Expected result:
----------------
Thread safety => disabled

Actual result:
--------------
Thread safety => enabled


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=77170&edit=1


Thread (3 messages)

« previous php.bugs (#233528) next »