diff --git a/10-opcache.ini b/10-opcache.ini index b3d4e6e6ee5cf9c6e96cbf8bb499636a7122d72a..252303a4760fd35d3c425fc5989411ee37f979c1 100644 --- a/10-opcache.ini +++ b/10-opcache.ini @@ -1,6 +1,3 @@ -; Enable Zend OPcache extension module -zend_extension=opcache - ; Determines if Zend OPCache is enabled opcache.enable=1 @@ -54,8 +51,6 @@ opcache.enable_cli=1 ; passes ;opcache.optimization_level=0x7FFFBFFF -; This hack should only be enabled to work around "Cannot redeclare class" -; errors. ;opcache.dups_fix=0 ; The location of the OPcache blacklist file (wildcards allowed). @@ -99,6 +94,15 @@ opcache.blacklist_filename=/etc/php.d/opcache*.blacklist ; for php-fpm, see /etc/php-fpm.d/*conf ;opcache.file_cache= +; Enables or disables read-only mode for the second level cache directory. +; It should improve performance for read-only containers, +; when the cache is pre-warmed and packaged alongside the application. +; Best used with `opcache.validate_timestamps=0`, `opcache.enable_file_override=1` +; and `opcache.file_cache_consistency_checks=0`. +; Note: A cache generated with a different build of PHP, a different file path, +; or different settings (including which extensions are loaded), may be ignored. +;opcache.file_cache_read_only=0 + ; Enables or disables opcode caching in shared memory. ;opcache.file_cache_only=0 diff --git a/php-8.4.0-ldap_r.patch b/php-8.4.0-ldap_r.patch deleted file mode 100644 index a57475196e39c290445c3c5e6ed1e65b09373bc8..0000000000000000000000000000000000000000 --- a/php-8.4.0-ldap_r.patch +++ /dev/null @@ -1,19 +0,0 @@ - -Use -lldap_r by default. - -diff -up php-8.4.0beta1/ext/ldap/config.m4.ldap_r php-8.4.0beta1/ext/ldap/config.m4 ---- php-8.4.0beta1/ext/ldap/config.m4.ldap_r 2024-08-13 15:48:12.000000000 +0200 -+++ php-8.4.0beta1/ext/ldap/config.m4 2024-08-13 16:23:24.744311776 +0200 -@@ -72,7 +72,11 @@ if test "$PHP_LDAP" != "no"; then - AH_TEMPLATE([HAVE_ORALDAP], - [Define to 1 if the ldap extension uses the Oracle Instant Client.]) - -- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then -+ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then -+ PHP_ADD_LIBRARY_WITH_PATH(lber, [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) -+ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) -+ -+ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then - PHP_ADD_LIBRARY_WITH_PATH([lber], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) - PHP_ADD_LIBRARY_WITH_PATH([ldap], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) - diff --git a/php-8.4.6-embed.patch b/php-8.5.0-embed.patch similarity index 60% rename from php-8.4.6-embed.patch rename to php-8.5.0-embed.patch index b926b678b1b9bb078542ad8a369075fe206d1d32..8df4a815b9e0ab960a787bbf25b721e43f2c6f60 100644 --- a/php-8.4.6-embed.patch +++ b/php-8.5.0-embed.patch @@ -1,12 +1,17 @@ diff -up ./sapi/embed/config.m4.embed ./sapi/embed/config.m4 ---- ./sapi/embed/config.m4.embed 2025-03-26 07:14:03.223791152 +0100 -+++ ./sapi/embed/config.m4 2025-03-26 07:16:43.185955159 +0100 -@@ -15,7 +15,8 @@ if test "$PHP_EMBED" != "no"; then +--- ./sapi/embed/config.m4.embed 2025-06-03 18:29:26.000000000 +0200 ++++ ./sapi/embed/config.m4 2025-06-05 07:18:33.662824247 +0200 +@@ -10,12 +10,12 @@ AC_MSG_CHECKING([for embedded SAPI libra + if test "$PHP_EMBED" != "no"; then + AS_CASE([$PHP_EMBED], + [yes|shared], [ +- LIBPHP_CFLAGS="-shared" ++ LIBPHP_CFLAGS="-shared -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" + AS_CASE(["$host_alias"], [*darwin*], [ SAPI_SHARED="libs/libphp.dylib" PHP_EMBED_TYPE=shared-dylib ], [PHP_EMBED_TYPE=shared]) - INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(orig_libdir)" -+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" + INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(orig_libdir)" ], [static], [ @@ -23,16 +28,3 @@ diff -up ./scripts/php-config.in.embed ./scripts/php-config.in ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@" ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@" php_embed_type="@PHP_EMBED_TYPE@" -diff --git a/configure.ac b/configure.ac -index 6dc1e45b34f..895c5153a2d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1306,7 +1306,7 @@ AS_VAR_IF([program_suffix], [NONE], [program_suffix=]) - - orig_libdir=$libdir - AS_CASE([$libdir], -- ['${exec_prefix}/lib'], [libdir=$libdir/php]) -+ [${prefix}/${PHP_LIBDIR}], [libdir=$libdir/php]) - - AS_CASE([$(eval echo $datadir)], - ['${prefix}/share'], [datadir=$datadir/php]) diff --git a/php-8.4.0-includedir.patch b/php-8.5.0-includedir.patch similarity index 77% rename from php-8.4.0-includedir.patch rename to php-8.5.0-includedir.patch index 8d3fcff19451f5301f02118a5a96387f3d91569c..2aaeee9cf57b9826df387bbcbb0acb879d7a1a4c 100644 --- a/php-8.4.0-includedir.patch +++ b/php-8.5.0-includedir.patch @@ -5,7 +5,7 @@ EXPANDED_PHP_CONFIG_FILE_PATH=$(eval echo "$PHP_CONFIG_FILE_PATH") EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=$(eval echo "$PHP_CONFIG_FILE_SCAN_DIR") -INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR -+INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR}/php:/usr/share/pear:/usr/share/php ++INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR} exec_prefix=$old_exec_prefix libdir=$old_libdir diff --git a/php-8.5.0-ldap_r.patch b/php-8.5.0-ldap_r.patch new file mode 100644 index 0000000000000000000000000000000000000000..9a9887eac67b842de63054e292e7f8778d2d3911 --- /dev/null +++ b/php-8.5.0-ldap_r.patch @@ -0,0 +1,19 @@ + +Use -lldap_r by default. + +diff -up ./ext/ldap/config.m4.ldap_r ./ext/ldap/config.m4 +--- ./ext/ldap/config.m4.ldap_r 2025-06-30 15:52:59.464676379 +0200 ++++ ./ext/ldap/config.m4 2025-06-30 15:53:57.499266397 +0200 +@@ -76,7 +76,11 @@ if test "$PHP_LDAP" != "no"; then + AH_TEMPLATE([HAVE_ORALDAP], + [Define to 1 if the ldap extension uses the Oracle Instant Client.]) + +- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then ++ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then ++ PHP_ADD_LIBRARY_WITH_PATH(lber, [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) ++ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) ++ ++ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then + PHP_ADD_LIBRARY_WITH_PATH([lber], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) + PHP_ADD_LIBRARY_WITH_PATH([ldap], [$LDAP_LIBDIR], [LDAP_SHARED_LIBADD]) + diff --git a/php-8.3.3-parser.patch b/php-8.5.0-parser.patch similarity index 63% rename from php-8.3.3-parser.patch rename to php-8.5.0-parser.patch index 49f7d5e4c50b3461180f71f5a92873c0f91a1f6e..d103ff04d4f2d806333b8e71084f26940b15f4c4 100644 --- a/php-8.3.3-parser.patch +++ b/php-8.5.0-parser.patch @@ -1,7 +1,7 @@ diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php ---- ./build/gen_stub.php.syslib 2020-06-25 08:11:51.782046813 +0200 -+++ ./build/gen_stub.php 2020-06-25 08:13:11.188860368 +0200 -@@ -3265,6 +3265,12 @@ function initPhpParser() { +--- ./build/gen_stub.php.syslib 2025-06-30 12:31:27.000000000 +0200 ++++ ./build/gen_stub.php 2025-06-30 15:49:00.751144274 +0200 +@@ -6082,6 +6082,12 @@ function initPhpParser() { } $isInitialized = true; @@ -11,6 +11,6 @@ diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php + return; + } + - $version = "5.0.0"; + $version = "5.6.1"; $phpParserDir = __DIR__ . "/PHP-Parser-$version"; if (!is_dir($phpParserDir)) { diff --git a/php-8.4.0-systzdata-v24.patch b/php-8.5.0-systzdata-v24.patch similarity index 96% rename from php-8.4.0-systzdata-v24.patch rename to php-8.5.0-systzdata-v24.patch index 6176a8bbb4c778f6eb58adcc1bed0aafca75ee20..75a73d3bf61e34799b4153520c2c2ad6b3ee55f8 100644 --- a/php-8.4.0-systzdata-v24.patch +++ b/php-8.5.0-systzdata-v24.patch @@ -37,11 +37,11 @@ r1: initial revision diff -up ./ext/date/config0.m4.systzdata ./ext/date/config0.m4 ---- ./ext/date/config0.m4.systzdata 2024-07-03 16:21:20.240786848 +0200 -+++ ./ext/date/config0.m4 2024-07-03 16:25:14.838995464 +0200 -@@ -8,6 +8,18 @@ - [PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -Wno-implicit-fallthrough"],, - [-Werror]) +--- ./ext/date/config0.m4.systzdata 2025-06-30 15:46:30.352141304 +0200 ++++ ./ext/date/config0.m4 2025-06-30 15:47:33.855594597 +0200 +@@ -7,6 +7,18 @@ + AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], + [PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -Wno-implicit-fallthrough"]) +PHP_ARG_WITH(system-tzdata, for use of system timezone data, + [AS_HELP_STRING([--with-system-tzdata[=DIR]],[to specify use of system timezone data])], no, no) @@ -55,12 +55,12 @@ diff -up ./ext/date/config0.m4.systzdata ./ext/date/config0.m4 + fi +fi + - PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1" - timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c - lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c" + PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -DHAVE_TIMELIB_CONFIG_H=1" + PHP_TIMELIB_CFLAGS="$PHP_DATE_CFLAGS" + PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c ---- ./ext/date/lib/parse_tz.c.systzdata 2024-07-02 15:43:13.000000000 +0200 -+++ ./ext/date/lib/parse_tz.c 2024-07-03 16:21:20.240786848 +0200 +--- ./ext/date/lib/parse_tz.c.systzdata 2025-06-30 12:31:27.000000000 +0200 ++++ ./ext/date/lib/parse_tz.c 2025-06-30 15:46:30.352327539 +0200 @@ -26,9 +26,33 @@ #include "timelib.h" #include "timelib_private.h" @@ -726,9 +726,9 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE; tmp = NULL; diff -up ./ext/date/php_date.c.systzdata ./ext/date/php_date.c ---- ./ext/date/php_date.c.systzdata 2024-07-02 15:43:13.000000000 +0200 -+++ ./ext/date/php_date.c 2024-07-03 16:21:20.240786848 +0200 -@@ -487,7 +487,11 @@ PHP_MINFO_FUNCTION(date) +--- ./ext/date/php_date.c.systzdata 2025-06-30 12:31:27.000000000 +0200 ++++ ./ext/date/php_date.c 2025-06-30 15:46:30.352655217 +0200 +@@ -491,7 +491,11 @@ PHP_MINFO_FUNCTION(date) php_info_print_table_row(2, "date/time support", "enabled"); php_info_print_table_row(2, "timelib version", TIMELIB_ASCII_VERSION); php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version); diff --git a/php-8.4.14.tar.xz b/php-8.5.0.tar.xz similarity index 32% rename from php-8.4.14.tar.xz rename to php-8.5.0.tar.xz index 90416009e1b0da63c27280b362cdcafe3cc144e4..d00e5d85d7d8a49189f049bd874122eb8198a6be 100644 --- a/php-8.4.14.tar.xz +++ b/php-8.5.0.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bac90ee7cf738e814c89b6b27d4d2c4b70e50942a420837e1a22f5fd5f9867a3 -size 13643936 +oid sha256:39cb6e4acd679b574d3d3276f148213e935fc25f90403eb84fb1b836a806ef1e +size 14314552 diff --git a/php-fpm.wants b/php-fpm.wants index 5c7c8e4fbe3d9069dfd1957c4661199d4948a83b..2b4e775ca5beab5b19b67e9803cc5670c5fd0d4d 100644 --- a/php-fpm.wants +++ b/php-fpm.wants @@ -1,3 +1,12 @@ +# This file provides default configuration and will be overwritten on package upgrades. +# Do not edit it directly. +# +# To customize: +# 1. Copy this file, preserving its name, to /etc/systemd/system/.d/ +# (create the directory if it does not exist) +# 2. Edit the copy as needed +# 3. Run: systemctl daemon-reload + [Unit] Wants=php-fpm.service diff --git a/php.ini b/php.ini index cdd2c0b5e23574a8009ba58bd1a5108b59b614fa..1d8e01abc5275f113c09e10feec03d34ef239d47 100644 --- a/php.ini +++ b/php.ini @@ -107,7 +107,7 @@ ; error_reporting ; Default Value: E_ALL ; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED ; log_errors ; Default Value: Off @@ -119,16 +119,16 @@ ; Development Value: 60 (60 seconds) ; Production Value: 60 (60 seconds) +; mysqlnd.collect_memory_statistics +; Default Value: Off +; Development Value: On +; Production Value: Off + ; output_buffering ; Default Value: Off ; Development Value: 4096 ; Production Value: 4096 -; register_argc_argv -; Default Value: On -; Development Value: Off -; Production Value: Off - ; request_order ; Default Value: None ; Development Value: "GP" @@ -322,11 +322,6 @@ serialize_precision = -1 ; https://php.net/disable-functions disable_functions = -; This directive allows you to disable certain classes. -; It receives a comma-delimited list of class names. -; https://php.net/disable-classes -disable_classes = - ; Colors for Syntax Highlighting mode. Anything that's acceptable in ; would work. ; https://php.net/syntax-highlighting @@ -433,6 +428,7 @@ max_input_time = 60 ; Maximum amount of memory a script may consume ; https://php.net/memory-limit memory_limit = 128M +max_memory_limit = -1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error handling and logging ; @@ -444,7 +440,7 @@ memory_limit = 128M ; operators. The error level constants are below here for convenience as well as ; some common settings and their meanings. ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and +; those related to E_NOTICE, which together cover best practices and ; recommended coding standards in PHP. For performance reasons, this is the ; recommend error reporting setting. Your production server shouldn't be wasting ; resources complaining about best practices and coding standards. That's what @@ -464,9 +460,6 @@ memory_limit = 128M ; intentional (e.g., using an uninitialized variable and ; relying on the fact it is automatically initialized to an ; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's ; initial startup @@ -482,13 +475,12 @@ memory_limit = 128M ; Common Values: ; E_ALL (Show all errors, warnings and notices including coding standards.) ; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) ; Default Value: E_ALL ; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED ; https://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT +error_reporting = E_ALL & ~E_DEPRECATED ; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but @@ -537,12 +529,6 @@ ignore_repeated_errors = Off ; https://php.net/ignore-repeated-source ignore_repeated_source = Off -; If this parameter is set to Off, then memory leaks will not be shown (on -; stdout or in the log). This is only effective in a debug compile, and if -; error reporting includes E_WARNING in the allowed list -; https://php.net/report-memleaks -report_memleaks = On - ; This setting is off by default. ;report_zend_debug = 0 @@ -621,6 +607,12 @@ report_memleaks = On ; Development value: 0 ; Production value: 0 +; This directive controls whether PHP will output the backtrace of fatal errors. +; Default Value: On +; Development Value: On +; Production Value: On +;fatal_error_backtraces = On + ;;;;;;;;;;;;;;;;; ; Data Handling ; ;;;;;;;;;;;;;;;;; @@ -670,14 +662,12 @@ request_order = "GP" ; that were passed when the script was invoked. These arrays are extremely ; useful when running scripts from the command line. When this directive is ; enabled, registering these variables consumes CPU cycles and memory each time -; a script is executed. For performance reasons, this feature should be disabled -; on production servers. -; Note: This directive is hardcoded to On for the CLI SAPI -; Default Value: On -; Development Value: Off -; Production Value: Off +; a script is executed. For security reasons, this feature should be disabled +; for non-CLI SAPIs. +; Note: This directive is ignored for the CLI SAPI +; This directive is deprecated. ; https://php.net/register-argc-argv -register_argc_argv = Off +;register_argc_argv = Off ; When enabled, the ENV, REQUEST and SERVER variables are created when they're ; first used (Just In Time) instead of when the script starts. If these @@ -818,6 +808,12 @@ enable_dl = Off ; https://php.net/fastcgi.impersonate ;fastcgi.impersonate = 1 +; Prevent decoding of SCRIPT_FILENAME when using Apache ProxyPass or +; ProxyPassMatch. This should only be used if script file paths are already +; stored in an encoded format on the file system. +; Default is 0. +;fastcgi.script_path_encoded = 1 + ; Disable logging through FastCGI connection. PHP's default behavior is to enable ; this feature. ;fastcgi.logging = 0 @@ -968,20 +964,17 @@ cli_server.color = On ; otherwise output encoding conversion cannot be performed. ;iconv.output_encoding = -[imap] -; rsh/ssh logins are disabled by default. Use this INI entry if you want to -; enable them. Note that the IMAP library does not filter mailbox names before -; passing them to rsh/ssh command, thus passing untrusted data to this function -; with rsh/ssh enabled is insecure. -;imap.enable_insecure_rsh=0 - [intl] ;intl.default_locale = ; This directive allows you to produce PHP errors when some error ; happens within intl functions. The value is the level of the error produced. ; Default is 0, which does not produce any errors. +; This directive is deprecated. ;intl.error_level = E_WARNING -;intl.use_exceptions = 0 +; If enabled this directive indicates that when an error occurs within an +; intl function a IntlException should be thrown. +; Default is Off, which means errors need to be handled manually. +;intl.use_exceptions = On [sqlite3] ; Directory pointing to SQLite3 extensions @@ -1049,6 +1042,14 @@ mail.add_x_header = Off ; RFC 2822 non conformant MTA. mail.mixed_lf_and_crlf = Off +; Control line ending mode for mail messages and headers. +; Possible values: "crlf" (default), "lf", "mixed", "os" +; - crlf: Use CRLF line endings +; - lf: Use LF line endings only (converts CRLF in message to LF) +; - mixed: Same as mail.mixed_lf_and_crlf = On +; - os: Use CRLF on Windows, LF on other systems +mail.cr_lf_mode = crlf + ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = @@ -1118,10 +1119,7 @@ mysqli.allow_persistent = On ; https://php.net/mysqli.max-links mysqli.max_links = -1 -; Default port number for mysqli_connect(). If unset, mysqli_connect() will use -; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the -; compile-time value defined MYSQL_PORT (in that order). Win32 will only look -; at MYSQL_PORT. +; Default port number for mysqli_connect(). ; https://php.net/mysqli.default-port mysqli.default_port = 3306 @@ -1130,15 +1128,15 @@ mysqli.default_port = 3306 ; https://php.net/mysqli.default-socket mysqli.default_socket = -; Default host for mysqli_connect() (doesn't apply in safe mode). +; Default host for mysqli_connect(). ; https://php.net/mysqli.default-host mysqli.default_host = -; Default user for mysqli_connect() (doesn't apply in safe mode). +; Default user for mysqli_connect(). ; https://php.net/mysqli.default-user mysqli.default_user = -; Default password for mysqli_connect() (doesn't apply in safe mode). +; Default password for mysqli_connect(). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") ; and reveal this password! And of course, any users with read access to this @@ -1158,6 +1156,9 @@ mysqlnd.collect_statistics = On ; Enable / Disable collection of memory usage statistics by mysqlnd which can be ; used to tune and monitor MySQL operations. +; Default Value: Off +; Development Value: On +; Production Value: Off mysqlnd.collect_memory_statistics = Off ; Records communication from all extensions using mysqlnd to the specified log @@ -1276,6 +1277,9 @@ session.use_cookies = 1 ; https://php.net/session.cookie-secure ;session.cookie_secure = +; https://php.net/session.cookie-partitioned +;session.cookie_partitioned = 0 + ; This option forces PHP to fetch and use a cookie for storing and maintaining ; the session id. We encourage this operation as it's very helpful in combating ; session hijacking when not specifying and managing your own session id. It is @@ -1541,7 +1545,7 @@ zend.assertions = -1 ; With mbstring support this will automatically be converted into the encoding ; given by corresponding encode setting. When empty mbstring.internal_encoding ; is used. For the decode settings you can distinguish between motorola and -; intel byte order. A decode setting cannot be empty. +; intel byte order. A decode setting must not be empty. ; https://php.net/exif.encode-unicode ;exif.encode_unicode = ISO-8859-15 @@ -1629,5 +1633,13 @@ ldap.max_links = -1 ; SSL stream context option. ;openssl.capath= +; The libctx is an OpenSSL library context. OpenSSL defines a default library +; context, but PHP OpenSSL also defines its own library context to avoid +; interference with other libraries using OpenSSL and to provide an independent +; context for each thread in ZTS. Possible values: +; "custom" - use a custom library context (default) +; "default" - use the default OpenSSL library context +;openssl.libctx=custom + [ffi] ; see /etc/php.d/20-ffi.ini diff --git a/php.spec b/php.spec index b07365b45f18c7e70037086a368d5a852e74d53e..680c7c42cacc2940f7d01943556c8b1e05c6cd89 100644 --- a/php.spec +++ b/php.spec @@ -1,6 +1,6 @@ # API/ABI check -%global apiver 20240924 -%global zendver 20240924 +%global apiver 20250925 +%global zendver 20250925 %global pdover 20240423 # Extension version %global fileinfover 1.0.5 @@ -10,7 +10,7 @@ %global _hardened_build 1 # version used for php embedded library soname -%global embed_version 8.4 +%global embed_version 8.5 %global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock) @@ -46,7 +46,15 @@ %bcond_with iodbc # OpenSSL2 with argon2 -%bcond_with openssl32 +%bcond_without openssl32 + +%if 0 +# liburiparser version 0.9.10 required +%bcond_without liburiparser +%else +# use bundled library instead +%bcond_with liburiparser +%endif # /usr/sbin/apsx with httpd < 2.4 and defined as /usr/bin/apxs with httpd >= 2.4 %{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} @@ -61,7 +69,7 @@ %bcond_without libgd %bcond_with zip -%global upver 8.4.14 +%global upver 8.5.0 Summary: PHP scripting language for creating dynamic web sites Name: php @@ -101,21 +109,21 @@ Source1002: composer.attr # Build fixes Patch1: php-8.4.0-httpd.patch -Patch5: php-8.4.0-includedir.patch -Patch6: php-8.4.6-embed.patch +Patch5: php-8.5.0-includedir.patch +Patch6: php-8.5.0-embed.patch Patch8: php-8.4.0-libdb.patch Patch9: 0001-add-sw_64-support.patch # Functional changes # Use system nikic/php-parser -Patch41: php-8.3.3-parser.patch +Patch41: php-8.5.0-parser.patch # use system tzdata -Patch42: php-8.4.0-systzdata-v24.patch +Patch42: php-8.5.0-systzdata-v24.patch # See http://bugs.php.net/53436 # + display PHP version backported from 8.4 Patch43: php-8.4.0-phpize.patch # Use -lldap_r for OpenLDAP -Patch45: php-8.4.0-ldap_r.patch +Patch45: php-8.5.0-ldap_r.patch # Ignore unsupported "threads" option on password_hash Patch46: php-8.0.7-argon2.patch # drop "Configure command" from phpinfo output @@ -135,7 +143,7 @@ Patch300: php-7.4.0-datetests.patch # WIP BuildRequires: bzip2-devel -BuildRequires: pkgconfig(libcurl) >= 7.29.0 +BuildRequires: pkgconfig(libcurl) >= 7.61.0 BuildRequires: httpd-devel >= 2.0.46 BuildRequires: pam-devel # to ensure we are using httpd with filesystem feature (see #1081453) @@ -150,7 +158,7 @@ BuildRequires: pkgconfig(openssl) >= 3.2 BuildRequires: openssl-devel >= 1.0.2 %endif BuildRequires: pkgconfig(sqlite3) >= 3.7.4 -BuildRequires: pkgconfig(zlib) >= 1.2.0.4 +BuildRequires: pkgconfig(zlib) >= 1.2.11 BuildRequires: smtpdaemon BuildRequires: pkgconfig(libedit) %if %{with libpcre} @@ -158,6 +166,7 @@ BuildRequires: pkgconfig(libpcre2-8) >= 10.30 %else Provides: bundled(pcre2) = 10.40 %endif +BuildRequires: pkgconfig(capstone) >= 3.0 %if %{with libxcrypt} BuildRequires: pkgconfig(libxcrypt) %endif @@ -173,6 +182,11 @@ BuildRequires: libtool-ltdl-devel %if %{with dtrace} BuildRequires: systemtap-sdt-devel %endif +%if %{with liburiparser} +BuildRequires: pkgconfig(liburiparser) >= 0.9.10 +%else +Provides: bundled(liburiparser) = 0.9.10 +%endif # used for tests BuildRequires: /usr/bin/ps %if %{with tzdata} @@ -198,12 +212,10 @@ Recommends: php-cli%{?_isa} = %{version}-%{release} Recommends: php-fpm%{?_isa} = %{version}-%{release} # as "php" is now mostly a meta-package, commonly used extensions Recommends: php-mbstring%{?_isa} = %{version}-%{release} -Recommends: php-opcache%{?_isa} = %{version}-%{release} Recommends: php-pdo%{?_isa} = %{version}-%{release} Recommends: php-sodium%{?_isa} = %{version}-%{release} Recommends: php-xml%{?_isa} = %{version}-%{release} - %description PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers to write dynamically generated web pages. PHP also @@ -285,8 +297,7 @@ License: PHP-3.01 AND BSD-2-Clause Requires: tzdata %endif %if %{with libpcre} -%global pcre2_buildver %(pkg-config --silence-errors --modversion libpcre2-8 2>/dev/null || echo 10.30) -Requires: pcre2%{?_isa} >= %{pcre2_buildver} +Requires: pcre2%{?_isa} >= %{installed_version_of pcre2} %endif # ABI/API check - Arch specific @@ -308,13 +319,15 @@ Provides: php-filter, php-filter%{?_isa} Provides: php-ftp, php-ftp%{?_isa} Provides: php-gettext, php-gettext%{?_isa} Provides: php-hash, php-hash%{?_isa} -Provides: php-mhash = %{version}, php-mhash%{?_isa} = %{version} +Provides: php-lexbor, php-lexbor%{?_isa} Provides: php-iconv, php-iconv%{?_isa} Obsoletes: php-json < 8 Obsoletes: php-pecl-json < 8 Obsoletes: php-pecl-jsonc < 8 Provides: php-json = %{upver}, php-json%{?_isa} = %{upver} Provides: php-libxml, php-libxml%{?_isa} +Obsoletes: php-opcache < 8.5.0 +Provides: php-opcache = %{upver}, php-opcache%{?_isa} = %{upver} Provides: php-openssl, php-openssl%{?_isa} Provides: php-phar, php-phar%{?_isa} Provides: php-pcre, php-pcre%{?_isa} @@ -325,6 +338,7 @@ Provides: php-sockets, php-sockets%{?_isa} Provides: php-spl, php-spl%{?_isa} Provides: php-standard = %{version}, php-standard%{?_isa} = %{version} Provides: php-tokenizer, php-tokenizer%{?_isa} +Provides: php-uri, php-uri%{?_isa} Provides: php-zlib, php-zlib%{?_isa} Obsoletes: php-pecl-phar < 1.2.4 @@ -332,7 +346,8 @@ Obsoletes: php-pecl-Fileinfo < 1.0.5 Provides: php-pecl-Fileinfo = %{fileinfover}, php-pecl-Fileinfo%{?_isa} = %{fileinfover} Provides: php-pecl(Fileinfo) = %{fileinfover}, php-pecl(Fileinfo)%{?_isa} = %{fileinfover} Obsoletes: php-mhash < 5.3.0 -Requires: (libxml2%{?_isa} >= %(rpm -q --queryformat="%%{VERSION}" libxml2) if libxml2) +Requires: (libxml2%{?_isa} >= %{installed_version_of libxml2} if libxml2) +Requires: (openssl-libs%{?_isa} >= %{installed_version_of openssl-libs} if openssl-libs) %description common The php-common package contains files used by both the php @@ -369,24 +384,6 @@ The php-devel package contains the files needed for building PHP extensions. If you need to compile your own PHP extensions, you will need to install this package. -%package opcache -Summary: The Zend OPcache -License: PHP-3.01 -BuildRequires: pkgconfig(capstone) >= 3.0 -Requires: php-common%{?_isa} = %{version}-%{release} -Obsoletes: php-pecl-zendopcache < 7.0.6 -Provides: php-pecl-zendopcache = %{version} -Provides: php-pecl-zendopcache%{?_isa} = %{version} -Provides: php-pecl(opcache) = %{version} -Provides: php-pecl(opcache)%{?_isa} = %{version} - -%description opcache -The Zend OPcache provides faster PHP execution through opcode caching and -optimization. It improves PHP performance by storing precompiled script -bytecode in the shared memory. This eliminates the stages of reading code from -the disk and compiling it on future access. In addition, it applies a few -bytecode optimization patterns that make code execution faster. - %package ldap Summary: A module for PHP applications that use LDAP # All files licensed under PHP version 3.01 @@ -448,7 +445,7 @@ Provides: php_database Provides: php-pdo_pgsql, php-pdo_pgsql%{?_isa} BuildRequires: krb5-devel BuildRequires: openssl-devel >= 1.0.2 -BuildRequires: postgresql-devel +BuildRequires: libpq-devel %description pgsql The php-pgsql package add PostgreSQL database support to PHP. @@ -552,7 +549,7 @@ Provides: php-xmlwriter, php-xmlwriter%{?_isa} Provides: php-xsl, php-xsl%{?_isa} BuildRequires: pkgconfig(libxslt) >= 1.1 BuildRequires: pkgconfig(libexslt) -BuildRequires: pkgconfig(libxml-2.0) >= 2.7.6 +BuildRequires: pkgconfig(libxml-2.0) >= 2.9.4 %description xml The php-xml package contains dynamic shared objects which add support @@ -618,7 +615,7 @@ support for using the bcmath library to PHP. Summary: A module for PHP applications for using the GNU MP library # All files licensed under PHP version 3.01 License: PHP-3.01 -BuildRequires: gmp-devel +BuildRequires: gmp-devel >= 4.2 Requires: php-common%{?_isa} = %{version}-%{release} %description gmp @@ -837,13 +834,10 @@ rm ext/date/tests/bug73837.phpt rm ext/standard/tests/file/file_get_contents_error001.phpt # fails sometime rm ext/sockets/tests/mcast_ipv?_recv.phpt -# cause stack exhausion -rm Zend/tests/bug54268.phpt -rm Zend/tests/bug68412.phpt # slow and erratic result rm sapi/cli/tests/upload_2G.phpt -# tar issue -rm ext/zlib/tests/004-mb.phpt +# Failing when build with PHP installed +rm ext/opcache/tests/zzz_basic_logging.phpt # avoid issue when 2 builds run simultaneously (keep 64321 for the SCL) %ifarch x86_64 @@ -987,6 +981,7 @@ ln -sf ../configure --disable-rpath \ --without-pear \ --without-gdbm \ + --enable-opcache-file \ --with-openssl \ %if %{with openssl32} --with-openssl-argon2 \ @@ -997,6 +992,9 @@ ln -sf ../configure %endif %if %{with libxcrypt} --with-external-libcrypt \ +%endif +%if %{with liburiparser} + --with-external-uriparser \ %endif --with-zlib \ --with-layout=GNU \ @@ -1004,7 +1002,6 @@ ln -sf ../configure %if %{with tzdata} --with-system-tzdata \ %endif - --with-mhash \ --without-password-argon2 \ %if %{with dtrace} --enable-dtrace \ @@ -1020,14 +1017,13 @@ if test $? != 0; then exit 1 fi -make %{?_smp_mflags} +%make_build } # Build cli and cgi SAPI, and most shared extensions pushd build-cgi build --enable-pcntl \ - --enable-opcache \ --with-capstone \ --enable-phpdbg --enable-phpdbg-readline \ --enable-mbstring=shared \ @@ -1089,6 +1085,7 @@ build --enable-pcntl \ %if %{with zip} --with-zip=shared \ %endif + --enable-pcntl \ --without-readline \ --with-libedit \ --enable-phar=shared \ @@ -1107,7 +1104,6 @@ without_shared="--disable-gd \ --disable-dom --disable-dba --without-unixODBC \ --without-mysqli \ --disable-pdo \ - --disable-opcache \ --disable-phpdbg \ --without-ffi \ --disable-xmlreader --disable-xmlwriter \ @@ -1150,8 +1146,6 @@ build --includedir=%{_includedir}/php-zts \ --program-prefix=zts- \ --disable-cgi \ --with-config-file-scan-dir=%{_sysconfdir}/php-zts.d \ - --enable-pcntl \ - --enable-opcache \ --with-capstone \ --enable-mbstring=shared \ --enable-mbregex \ @@ -1337,8 +1331,8 @@ install -m 755 -d $RPM_BUILD_ROOT/run/php-fpm # this folder requires systemd >= 204 install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/php-fpm.service.d install -Dm 644 %{S:6} $RPM_BUILD_ROOT%{_unitdir}/php-fpm.service -install -Dm 644 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/httpd.service.d/php-fpm.conf -install -Dm 644 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/nginx.service.d/php-fpm.conf +install -Dm 644 %{S:12} $RPM_BUILD_ROOT%{_unitdir}/httpd.service.d/php-fpm.conf +install -Dm 644 %{S:12} $RPM_BUILD_ROOT%{_unitdir}/nginx.service.d/php-fpm.conf # Nginx configuration install -D -m 644 %{S:13} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/php-fpm.conf @@ -1358,7 +1352,7 @@ for mod in pgsql odbc ldap snmp \ mysqlnd mysqli \ mbstring gd dom xsl soap bcmath dba \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ - tokenizer opcache \ + tokenizer \ pdo \ %if %{with zip} zip \ @@ -1376,10 +1370,6 @@ for mod in pgsql odbc ldap snmp \ xmlreader xmlwriter do case $mod in - opcache) - # Zend extensions - TESTCMD="$TESTCMD --define zend_extension=$mod" - ini=10-${mod}.ini;; pdo_*|mysqli|xmlreader) # Extensions with dependencies on 20-* TESTCMD="$TESTCMD --define extension=$mod" @@ -1447,6 +1437,7 @@ cat files.curl files.phar files.fileinfo \ files.ftp files.bz2 files.ctype \ files.tokenizer > files.common +install -m644 %{S:50} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/10-opcache.ini # The default Zend OPcache blacklist file install -m 644 %{S:51} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/opcache-default.blacklist %if %{with zts} @@ -1509,10 +1500,13 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %license timelib_LICENSE %doc php.ini-* %config(noreplace) %{_sysconfdir}/php.ini +%config(noreplace) %{_sysconfdir}/php.d/10-opcache.ini +%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist %dir %{_sysconfdir}/php.d %dir %{_libdir}/php %dir %{_libdir}/php/modules %if %{with zts} +%config(noreplace) %{_sysconfdir}/php-zts.d/opcache-default.blacklist %dir %{_sysconfdir}/php-zts.d %dir %{_libdir}/php-zts %dir %{_libdir}/php-zts/modules @@ -1555,16 +1549,16 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/nginx/conf.d/php-fpm.conf %config(noreplace) %{_sysconfdir}/nginx/default.d/php.conf %{_unitdir}/php-fpm.service -%config(noreplace) %{_sysconfdir}/systemd/system/httpd.service.d/php-fpm.conf -%config(noreplace) %{_sysconfdir}/systemd/system/nginx.service.d/php-fpm.conf +%{_unitdir}/httpd.service.d/php-fpm.conf +%{_unitdir}/nginx.service.d/php-fpm.conf %dir %{_sysconfdir}/systemd/system/php-fpm.service.d %dir %ghost /run/php-fpm %{_sbindir}/php-fpm %dir %{_sysconfdir}/php-fpm.d # log owned by apache for log %attr(770,apache,root) %dir %{_localstatedir}/log/php-fpm -%dir %{_datadir}/fpm -%{_datadir}/fpm/status.html +%dir %{_datadir}/php/fpm +%{_datadir}/php/fpm/status.html %if %{with lsws} %files litespeed @@ -1610,11 +1604,6 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %endif %files enchant -f files.enchant %files mysqlnd -f files.mysqlnd -%files opcache -f files.opcache -%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist -%if %{with zts} -%config(noreplace) %{_sysconfdir}/php-zts.d/opcache-default.blacklist -%endif %if %{with zip} %files zip -f files.zip %endif @@ -1632,6 +1621,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || : %{_fileattrsdir}/composer.attr %changelog +* Tue Nov 18 2025 Funda Wang - 8.5.0-1 +- update to 8.5.0 + * Wed Oct 22 2025 Funda Wang - 8.4.14-1 - New version 8.4.14