This indirectly fixes bug #74398 where --with-extname is expected to be
configured shared with our default dependency package. With a non
default deps, it still can be enforced --with-extname=static
A directory given to configure by --with-gettext=dir is only
used within the very first AC_CHECK_LIB. This is because the
temporary modified LDFLAGS variable is reset too early.
This results in functions not detected properly.
The original issue and patch was reported for OpenWrt/LEDE
distribution by @Dimazhan at:
https://github.com/openwrt/packages/issues/4250
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* 'PHP-7.0' of git.php.net:/php-src:
Add NEWS
Resolve bug #74188 (undefined statics raising with ?? operator)
Fixed bug #72071: Prevent Max-Age from being negative
Update NEWS with OpenSSL 1.1.0 support info
Add OpenSSL 1.1.0 support to PHP 7.0
Added support for ASN.1 UTCTime without seconds part (being 11 characters
long instead of 13).
Additionally, fixed incorrect handling of DST on systems without gmtoff.
In some cases, when an environment is unclean, tests might get stuck fe
when some incorrect ini file is loaded. As the test depends on the core
only, it is safer to explicitly ignore the ini. Any ini can be passed in
the cmd itself, if needed.
For historical reasons, fsockopen() accepts the port and hostname
separately: fsockopen('127.0.0.1', 80)
However, with the introdcution of stream transports in PHP 4.3,
it became possible to include the port in the hostname specifier:
fsockopen('127.0.0.1:80')
Or more formally: fsockopen('tcp://127.0.0.1:80')
Confusing results when these two forms are combined, however.
fsockopen('127.0.0.1:80', 443) results in fsockopen() attempting
to connect to '127.0.0.1:80:443' which any reasonable stack would
consider invalid.
Unfortunately, PHP parses the address looking for the first colon
(with special handling for IPv6, don't worry) and calls atoi()
from there. atoi() in turn, simply stops parsing at the first
non-numeric character and returns the value so far.
The end result is that the explicitly supplied port is treated
as ignored garbage, rather than producing an error.
This diff replaces atoi() with strtol() and inspects the
stop character. If additional "garbage" of any kind is found,
it fails and returns an error.
The tests can sometimes fail because it chooses a passive port for ftp that
is already in use. This makes the test attempt multiple times to find a free
port.
This fixes:
- Fixed bug #72719 (Relative datetime format ignores weekday on sundays only).
- Fixed bug #73294 (DateTime wrong when date string is negative).
- Fixed bug #73489 (wrong timestamp when call setTimeZone multi times with UTC
offset).
- Fixed bug #73858 (first/last day of' flag is not being reset).
- Fixed bug #73942 ($date->modify('Friday this week') doesn't return a Friday
if $date is a Sunday).
- Fixed bug #74057 (wrong day when using "this week" in strtotime).
The file_cache_only option causes the storage to be per process,
furthermore the arena is destroyed per request. Thus, zend_string's
can't survive between request and the permanent flag should not
be set. This is already done with the file cache part, but the
persistency part is used in various scenarios and should respect
this case as well. In this particular bug, the pcre pattern cache
needs to survive between requests and uses pattern strings as hash
keys. One more case relevant here would be various situations where
the flow disables the use of shared memory.
The fix is based on the same strategy for handling namespace
declarations as used by getAttributeNode. Note that this strategy makes
these methods not return a DOMAttr for xmlns* attributes, but an
instance of the (undocumented) class DOMNameSpaceNode. This is not
really ideal, but at least this fix makes the behavior of
getAttributeNode and getAttributeNodeNS consistent.
A follow-up action would be to investigate whether DOMNameSpaceNode can
be made into a subclass of DOMAttr (which may be hard due to the way
libxml treats namespace declarations) or document this deviating return
value for xmlns* attributes.
This bug had already been fixed, but apparently there's no regression
test yet, so we add one.
Note that the expected image has black pixel artifacts, which are
another issue (perhaps bug #40158), and would have to be adressed
separately.
We must take into account the line padding, when we're reading XBM
files.
We deliberately ignore the potential integer overflow here, because
that would be caught by gdImageCreate() or even earlier if `bytes==0`,
what happens in libgd00094.phpt which we adapt accordingly.
GD2 stores the number of horizontal and vertical chunks as words (i.e. 2
byte unsigned). These values are multiplied and assigned to an int when
reading the image, what can cause integer overflows. We have to avoid
that, and also make sure that either chunk count is actually greater
than zero. If illegal chunk counts are detected, we bail out from
reading the image.
(cherry picked from commit 5b5d9db3988b829e0b121b74bb3947f01c2796a1)
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully.
(cherry picked from commit cdb648dc4115ce0722f3cc75e6a65115fc0e56ab)
opcache_reset() only schedules the restart. Under circumstances,
the follow up requests might run uncached, until the restart
condition is met. To mitigate the false positives caused by this
behavior, any tests using opcache_reset() should not be put in
between other tests. Thus, moving the corresponding test to be
executed last.
* 'PHP-7.0' of git.php.net:/php-src:
Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning
Fixed#73907 (nextSibling property not included in var_dump of DOMNode)
Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
Fix glob-wrapper.phpt to not fail in Windows
Fix#73893: A hidden danger of death cycle in a function of gd
It seems fair to remove this warning, given that:
* it is not documented in the official documentation
* the $specified property, which has a similar 'not implemented' status,
also does not trigger a warning
* it apparently hinders quite a lot of people during debugging, judging by
the number of votes on the bug
php_check_open_basedir() expects a local filesystem path,
but we're handing it a `glob://...` URI instead.
Move the check to after the path trim so that we're checking
a meaningful pathspec.
The stream handler assumed all HTTP headers contained exactly one space,
but the standard says there may be zero or more. Should fix Bug #47021,
and any other edge cases caused by a web server sending unusual spacing,
e.g. the MIME type discovered from Content-Type: can no longer contain
leading whitespace.
We strip trailing whitespace from the headers added into
$http_response_header as well.
1. Increased the timeout on sapi/fpm tests to match the cli server
2. Disabled session GC in session_set_save_handler_basic.phpt
3. Fixed GC in save_handler.inc to delete files based on age
Use another define for better compatibility
Test case for #72583 Feature. Small optimisations.
Adjust conditional directives according to coding standards
Add more compatibility for "end of line" on multiple environements
Updated execute.phpt test after switching to integer mapping
According to the comment, it has not been deemed necessary to close compressed
files. However, we don't want to keep unclosed file handles to save ressources.
So we're also closing compressed archives, if they're not aliased.
Persistent connections skipped resetting $connect_error and $connect_errno values
This adds the "clear error" line to persistent connections for consistency
* PHP-7.0.15:
Fix#73832 - leave the table in a safe state if the size is too big.
Fix bug #73831 - NULL Pointer Dereference while unserialize php object
* PHP-5.6:
Fix bug #73737 FPE when parsing a tag format
Fix bug #73773 - Seg fault when loading hostile phar
Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
Fix bug #73768 - Memory corruption when loading hostile phar
Fix int overflows in phar (bug #73764)
* PHP-5.6.30:
Fix bug #73737 FPE when parsing a tag format
Fix bug #73773 - Seg fault when loading hostile phar
Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
Fix bug #73768 - Memory corruption when loading hostile phar
Fix int overflows in phar (bug #73764)
Avoid many string duplications, use interning (browscap-local, of
course), reduce pattern size, use more compact key-value
representation, build result array only on demand.
Testing corpus provided by Anatol against current browscap.ini lite.
About 30% of all agents are not recognized by this browscap.ini,
but this should give us decent coverage.
The parent process was releasing the child semaphore
after the child process continued execution. Now
the child semaphore is released before the child
process continues execution.
This bug was caused by the fact that dom_get_elements_by_tag_name_ns_raw
uses an empty string to filter on the default namespace (as NULL means
'no filter'), whereas in the node itself the default namespace is
signalled by nodep->ns being null.
* 'PHP-7.0' of git.php.net:/php-src: (146 commits)
Flush stderr on win32 in cli_log_message
Fixed bug #73154
FIx bug #70213
Fix dom class can't be inherited by the internal class
Another try at making concat_003 more reliable
Fix flaky openssl_pkey_new test
Make Opcache tests using the cli server more reliable
Revert "Fix #73530: Unsetting result set may reset other result set"
define php_ap_map_http_request_error function for older httpd only
add old versions of httpd support
Disable AppVeyor fast_finish
Makes the sapi web server and curl tests more reliable
Fixes the curl tests to be more reliable in Travis CI
Interpretation of curl_setopt values for boolean parameters
Fixes#65689. PDO_Firebrid / exec() does not free allocated statement.
Fix alpn_ctx leaking in openssl
Fixed bug #73373 (deflate_add does not verify that output was not truncated)
Fix IS_UNDEF comparisons in opcache
Fixed bug #73704 (phpdbg shows the wrong line in files with shebang)
Increase timing quota for small string concat test
...
In Travis CI the nowait.phpt test sometimes fails because of
the usleep() not being long enough ensure proper
execution order. Instead of depending on sleeping the
test now uses two semaphores to guarantee execution order.
Same fix already applied to ext/curl/tests/server.inc
and sapi/cli/tests/php_cli_server.inc
1. Increases the amount of time for the PHP built-in server to accept a connection
2. Outputs an error if the PHP built-in server fails
This reverts commit eb570294a2.
That commit caused a regression, so it's probably best to revert it, and
to tackle the issue for the next minor release.
1. Increased the time for the sapi/cli/tests/php_cli_server.inc to accept connections.
2. sapi/cli/tests/php_cli_server.inc has errors messages and a `stop` function.
3. bug67429.phpt uses the `stop` function to shutdown the webserver before starting a new one.
4. Removed ext/curl/tests/bug48203_multi-win32.phpt test now that ext/curl/tests/bug48203_multi.phpt
runs on Windows also.
1. Increases the amount of time for the PHP built-in server to accept a connection
2. Outputs an error if the PHP built-in server fails
3. In bug48203_multi.phpt the test no longer starts and stops multiple PHP built-in servers
These conditions were formerly `!q->pData` and `!p->pData`, and should
now be detected as undefined variables, using the special type IS_UNDEF.
Incidentally, this syntax raised a logical-not-parentheses compiler
warning, now gone.
Particularly on slower VMs, the sporadic fails can still happen.
The timing is kept in an uncritical range, but allows the tests
pass there. Mayby, it'd make sense to introduce a new group for
this kind of tests, so tests requiring exact time measurement
can be avoided on unsuitable environments.