Commit Graph

359 Commits

Author SHA1 Message Date
Christoph M. Becker
e6044d4455 Fix #55847: DOTNET .NET 4.0 GAC new location
If we do not specify the exact version of the .NET framework to use,
the default CLR is loaded, which is typically CLR 2, which is very old.
Therefore, we introduce a `PHP_INI_SYSTEM` setting, which allows users
to choose the desired .NET framework version.  The value of the setting
are the first three parts of the framework's version number, separated
by dots, and prefixed with "v", e.g. "v4.0.30319".  If the value of the
INI setting is `NULL` (the default) or an empty string, the default CLR
is used.

Internally, we switch from the most generic `CoCreateInstance()` to
`CorBindToRuntime()` which is implemented in mscoree.dll.  To avoid the
hard dependency to that library, we load dynamically.

So this fix is supposed to be fully backwards compatible.

Closes GH-5949
2020-08-22 12:42:34 +02:00
Nikita Popov
824541d57e Disable report_zend_debug by default
We might just want to drop this completely, but at least don't
enable it by default. It already gets disabled by a number of
SAPIs, but we should make that the default state.
2020-08-12 10:36:40 +02:00
Tyson Andre
07db64156e [RFC] Make string length for getTraceAsString() configurable
Add a `zend.exception_string_param_max_len` ini setting.
(same suffix as `log_errors_max_len`)

Allow values between 0 and 1000000 bytes.
For example, with zend.exception_string_param_max_len=0,
"" would represent the empty string, and "..." would represent something
longer than the empty string.
Previously, this was hardcoded as exactly 15 bytes.

Discussion: https://externals.io/message/110717

Closes GH-5769
2020-07-25 09:50:57 -04:00
Nikita Popov
9250abfb04 php.ini cleanup
[ci skip]
2020-07-22 15:46:03 +02:00
Christoph M. Becker
340e2ead77 Export php_gd_libgdimageptr_from_zval_p()
Some extension may need to retrieve the `gdImagePtr` from an `GdImage`
object; thus, we export the respective function.  To not being forced
to include gd.h in php_gd.h, we use the opaque `struct gdImageStruct *`
as return type.

We also rename php_gd2.dll to php_gd.dll, since there's not really much
point in giving the DLL a version number, since there is no php_gd.dll
for years (if there ever has been).  Renaming, on the other hand,
matches the name on other systems (gd.so), and allows to actually use
`ADD_EXTENSION_DEP()`.
2020-07-11 19:33:20 +02:00
Christoph M. Becker
4fa3687e56 Unbundle ext/xmlrpc
According to <https://wiki.php.net/rfc/unbundle_xmlprc> we unbundle
ext/xmlrpc.
2020-05-29 16:47:44 +02:00
Nikita Popov
0a74da385d Add support for replaying warnings in opcache
If opcache.record_warnings is enabled, opcache will record
compilation warnings and replay them when the file is included
again. The primary use case I have in mind for this is automated
testing of the opcache file cache.

This resolves bug #76535.
2020-05-20 11:20:21 +02:00
Nikita Popov
f768a5563f Merge branch 'PHP-7.4'
* PHP-7.4:
  Clarify session.cookie_samesite="None"
2020-03-18 16:00:23 +01:00
Nikita Popov
10bf541fd9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Clarify session.cookie_samesite="None"
2020-03-18 16:00:05 +01:00
Nikita Popov
c00cce3229 Clarify session.cookie_samesite="None" 2020-03-18 15:59:30 +01:00
Christoph M. Becker
4c0ddd094a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix typo in php.ini comment
2020-03-15 15:02:10 +01:00
Christoph M. Becker
b48c05a982 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix typo in php.ini comment
2020-03-15 15:01:23 +01:00
Jacob Dreesen
68e2da6362 Fix typo in php.ini comment 2020-03-15 15:00:05 +01:00
Nikita Popov
df71503e83 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove value from comment in php.ini files
2020-02-12 12:18:34 +01:00
Michael Voříšek
61e76927b4 Remove value from comment in php.ini files
Closes GH-5164.
2020-02-12 12:18:22 +01:00
Nikita Popov
2ff79942cc Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove hint to security purpose of disable_functions
2020-02-10 10:05:42 +01:00
jsmmo
038ca4bb07 Remove hint to security purpose of disable_functions
These features are not intended to offer security against a
determined attacher with full local code execution privileges.

Closes GH-5150.
2020-02-10 10:05:09 +01:00
Pieter Hordijk
b97c9dc72a
Added opcache extension to inis
Extensions are not loaded by default (commented out)

Closes GH-5136
2020-02-01 07:15:18 +01:00
George Peter Banyard
12e903d894 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79080 [ci skip]
2020-01-25 13:31:43 +01:00
George Peter Banyard
86f463c396 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79080 [ci skip]
2020-01-25 13:31:10 +01:00
George Peter Banyard
a1f2f8f06e Fixed bug #79080 [ci skip]
Rewrote session.gc_probability and session.gc_divisor INI setting
description to be more succint.
2020-01-25 13:29:36 +01:00
Nikita Popov
ae706e51e1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update php.ini files to add missing FTP extension
2020-01-17 09:51:31 +01:00
aand18
4d24f5a494 Update php.ini files to add missing FTP extension
FTP functionality isn't enabled by default and not listed as a disabled
extension in the `php.ini` file either.

This should spare a few googles to anyone needing FTP functionality in PHP.

Closes GH-5084.
2020-01-17 09:51:18 +01:00
Remi Collet
97f994762f Merge branch 'PHP-7.4'
* PHP-7.4:
  typo and better wording
2019-10-24 07:43:56 +02:00
Remi Collet
69b608cf13 typo and better wording 2019-10-24 07:43:49 +02:00
Remi Collet
ff09d39328 Merge branch 'PHP-7.4'
* PHP-7.4:
  Added suppot for glob() wildcard matching in ffi.preload directive
  Reverting push to wrong repo
  Update alloc patch
2019-10-24 07:40:27 +02:00
Dmitry Stogov
fea8c5481b Added suppot for glob() wildcard matching in ffi.preload directive 2019-10-24 07:40:07 +02:00
Remi Collet
3d9bbd1b53 Merge branch 'PHP-7.4'
* PHP-7.4:
  add new ffi.preload  option in php.ini and display ini entries in MINFO
2019-10-23 07:49:29 +02:00
Remi Collet
dcd772325d add new ffi.preload option in php.ini and display ini entries in MINFO 2019-10-23 07:49:13 +02:00
Christoph M. Becker
0436bc875e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix miscellaneous typos in docs
2019-10-19 19:20:25 +02:00
Tyson Andre
38f388fba4 Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
Nikita Popov
21e631e473 Merge branch 'PHP-7.4' 2019-10-06 10:07:57 +02:00
Nikita Popov
6623e7ac51 Add support for mbstring.regex_retry_limit
This is very similar to the existing mbstring.regex_stack_limit,
but for backtracking. The default value matches pcre.backtrack_limit.
Only used on libonig >= 2.8.0.
2019-10-06 10:06:33 +02:00
Nikita Popov
1cde9e8528 Merge branch 'PHP-7.4' 2019-09-30 10:30:20 +02:00
Nikita Popov
1806ce9cb0 Add max_depth option to unserialize()
Add a max_depth option to unserialize and an unserialize_max_depth
ini setting, which can be used to control the depth limit. The
default value is 4096.

This option is intended to prevent stack overflows during the
unserialization of deeply nested structures.

This fixes bug #78549 and addresses oss-fuzz #17581, #17589, #17664,
and #17788.
2019-09-30 10:28:24 +02:00
Nikita Popov
790ed7d540 Enable display_startup_errors by default 2019-09-06 14:33:03 +02:00
Christoph M. Becker
6926018bda Merge branch 'PHP-7.4'
* PHP-7.4:
  Document opcache.preload_user directive
2019-09-03 14:08:52 +02:00
Christoph M. Becker
61dcae50d5 Document opcache.preload_user directive 2019-09-03 14:08:17 +02:00
Nikita Popov
ea5854ca8c Make error_reporting=E_ALL the default 2019-09-02 10:03:26 +02:00
Christoph M. Becker
29925cef47 Merge branch 'PHP-7.4'
* PHP-7.4:
  add ffi to php.ini extension [ci skip]
2019-08-27 15:54:18 +02:00
Pavel Dyakonov
f08095faa5 add ffi to php.ini extension [ci skip] 2019-08-27 15:53:51 +02:00
Christoph M. Becker
54401001a8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Allow multiple cache instances per user/host on Windows
2019-07-17 19:52:49 +02:00
Christoph M. Becker
e2ed7e6716 Allow multiple cache instances per user/host on Windows
Formerly, there was at most a single OPcache instance per user and the
so called system ID (which is determined from the PHP version).
Sometimes multiple OPcaches might be desired, though, particularly for
unrelated CLI scripts, which may even be necessary (e.g. for our test
suite in parallel mode).

We therefore introduce a new INI directive `opcache.cache_id` which
allows to configure independent OPcache instances for the same user.

We also use `GetUserNameW()` instead of `php_win32_get_username()`,
because the latter retrieves the user name encoded in the
`default_charset`, which can obviously yield different results for
different charsets, leading to OPcache "incompatibilities".  Slightly
worse, some characters may not even be encodeable in the
`default_charset` and would be replaced by question marks, which could
result in different users sharing the same OPcache.

We also refactor, and re-use existing APIs to avoid duplicated code.
2019-07-17 19:51:07 +02:00
Christoph M. Becker
7556600dfc Fix #65547: Default value for sunrise/sunset zenith still wrong
The value of the zenith angle to calculate sunrise and sunset times is
commonly defined as 90°50', and is "obtained by adding the average
apparent radius of the Sun (16') to the average amount of atmospheric
refraction at the horizon (34')", according to
http://aa.usno.navy.mil/faq/docs/RST_defs.php.

This value is also used for the Sunrise/Sunset Algorithm published in
the Almanac for Computers, 1990, see
https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm.
2019-07-15 13:52:09 +02:00
Joe Watkins
d41ab64456
Merge branch 'PHP-7.4'
* PHP-7.4:
  simple ignore arguments in exceptions implementation
2019-07-02 13:19:25 +02:00
Joe Watkins
0819e6dc9b
simple ignore arguments in exceptions implementation 2019-07-02 13:18:39 +02:00
Nikita Popov
ca8f348646 Merge branch 'PHP-7.4' 2019-06-17 13:14:26 +02:00
Nikita Popov
1b63528d38 Merge branch 'PHP-7.3' into PHP-7.4 2019-06-17 13:14:18 +02:00
Erik Lundin
9f0515c40c Add syslog.filter=raw
This passes through syslog message unchanged, without splitting
messages at newlines.
2019-06-17 13:13:25 +02:00
Kalle Sommer Nielsen
c71e35ea91 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove some more interbase leftovers
  Fix typo
  NEWS for ext/interbase unbundling
2019-05-01 23:45:24 +03:00