php: switch to `nts` by default

Changed files
+22 -2
nixos
doc
manual
from_md
release-notes
release-notes
modules
services
web-servers
apache-httpd
pkgs
development
interpreters
+9
nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
···
</listitem>
<listitem>
<para>
+
PHP is now built <literal>NTS</literal> (Non-Thread Safe)
+
style by default, for Apache and <literal>mod_php</literal>
+
usage we still enable <literal>ZTS</literal> (Zend Thread
+
Safe). This has been a common practice for a long time in
+
other distributions.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
<literal>protonup</literal> has been aliased to and replaced
by <literal>protonup-ng</literal> due to upstream not
maintaining it.
+4
nixos/doc/manual/release-notes/rl-2211.section.md
···
- PHP now defaults to PHP 8.1, updated from 8.0.
+
- PHP is now built `NTS` (Non-Thread Safe) style by default, for Apache and
+
`mod_php` usage we still enable `ZTS` (Zend Thread Safe). This has been a
+
common practice for a long time in other distributions.
+
- `protonup` has been aliased to and replaced by `protonup-ng` due to upstream not maintaining it.
- Perl has been updated to 5.36, and its core module `HTTP::Tiny` was patched to verify SSL/TLS certificates by default.
+8 -1
nixos/modules/services/web-servers/apache-httpd/default.nix
···
sed -i $out/bin/apachectl -e 's|$HTTPD -t|$HTTPD -t -f /etc/httpd/httpd.conf|'
'';
-
php = cfg.phpPackage.override { apacheHttpd = pkg; };
+
php = cfg.phpPackage.override { apxs2Support = true; apacheHttpd = pkg; };
phpModuleName = let
majorVersion = lib.versions.major (lib.getVersion php);
···
message = ''
Options `services.httpd.virtualHosts.<name>.enableACME` and
`services.httpd.virtualHosts.<name>.useACMEHost` are mutually exclusive.
+
'';
+
}
+
{
+
assertion = cfg.enablePHP -> php.ztsSupport;
+
message = ''
+
The php package provided by `services.httpd.phpPackage` is not built with zts support. Please
+
ensure the php has zts support by settings `services.httpd.phpPackage = php.override { ztsSupport = true; }`
'';
}
] ++ map (name: mkCertOwnershipAssertion {
+1 -1
pkgs/development/interpreters/php/generic.nix
···
, phpdbgSupport ? true
# Misc flags
-
, apxs2Support ? !stdenv.isDarwin
+
, apxs2Support ? false
, argon2Support ? true
, cgotoSupport ? false
, embedSupport ? false