Hi all,
I've got a question regarding the thread-safety of libphp7 (PHP 7.1.15) in Apache 2.4.29 (Solaris 11.3 SRU 31). After upgrading from PHP5 (5.6.34) to PHP7, I encountered a strange problem with Nextcloud. Nextcloud started to complain that hash algorithms (e.g. sha256) weren't available ("PHP Warning: hash_hmac(): Unknown hashing algorithm: sha1) and some Apache processes even died with Signal 11 according to Apache's log file.
I found postings in which it is mentioned that this problem might be caused by a multi-threading-related issue. Apache is run in the execution model "event", which means that it actually uses threads.
My question to the Solaris community: Are "libphp7" and the PHP extensions which come with Solaris 11.3 SRU 31 all thread-safe or should I change from "libphp7" to "php-fpm" (or a non-threaded execution model in Apache, e.g. "prefork")?
If they are really thread-safe, my next question would be: Does anyone by chance know what might be causing this message to appear out of nowhere? When asking PHP7, which hashing algorithms it is capable of, it displays the ones which are complained by Nextcloud as being missing:
steffen@sirius:~# /usr/php/7.1/bin/php -r "print_r(hash_algos());"
Array
(
[0] => md2
[1] => md4
[2] => md5
[3] => sha1
[4] => sha224
[5] => sha256
[6] => sha384
[7] => sha512/224
[8] => sha512/256
[9] => sha512
[10] => sha3-224
[11] => sha3-256
[12] => sha3-384
[13] => sha3-512
[14] => ripemd128
[15] => ripemd160
[16] => ripemd256
[17] => ripemd320
[18] => whirlpool
[19] => tiger128,3
[20] => tiger160,3
[21] => tiger192,3
[22] => tiger128,4
[23] => tiger160,4
[24] => tiger192,4
[25] => snefru
[26] => snefru256
[27] => gost
[28] => gost-crypto
[29] => adler32
[30] => crc32
[31] => crc32b
[32] => fnv132
[33] => fnv1a32
[34] => fnv164
[35] => fnv1a64
[36] => joaat
[37] => haval128,3
[38] => haval160,3
[39] => haval192,3
[40] => haval224,3
[41] => haval256,3
[42] => haval128,4
[43] => haval160,4
[44] => haval192,4
[45] => haval224,4
[46] => haval256,4
[47] => haval128,5
[48] => haval160,5
[49] => haval192,5
[50] => haval224,5
[51] => haval256,5
)
So they don't seem to be actually missing. Something must be there which disables them after some time. As a quick-fix, I downgraded to PHP5 - no problem there.
Thank you very much for any help!
Kind regards,
Steffen