George Peter Banyard [Sat, 20 Jul 2019 23:10:31 +0000 (01:10 +0200)]
Renamed MySQLi test to remove duplicate 'mysqli_'
Closes GH-4441
Markus Staab [Sat, 20 Jul 2019 23:01:36 +0000 (01:01 +0200)]
Fix typos
Closes GH-4447
Peter Kokot [Sat, 20 Jul 2019 22:49:35 +0000 (00:49 +0200)]
Fix failed tests for phar
- when $status is boolean, E_NOTICE appears and tests fail
- opcache is never enabled on these tests anyway.
- Add opcache.revalidate_freq=0 to testing script
Instead of checking this in the tests files it can be used directly in
the main testing script. Also this fixes failed tests.
- Use opcache_invalidate() instead of sleep() delay in some tests. Some
delays are still used since the opcache_invalidate seems to be buggy
and not working as expected.
Closes GH-4392
Peter Kokot [Sat, 20 Jul 2019 22:40:59 +0000 (00:40 +0200)]
Move HAVE_SQLITE3_CLOSE_V2 to pdo_sqlite
Closes GH-4444
Remi Collet [Sat, 20 Jul 2019 05:57:13 +0000 (07:57 +0200)]
Fixed bug #78314 (missing freetype support/functions with external gd)
Peter Kokot [Fri, 19 Jul 2019 22:27:10 +0000 (00:27 +0200)]
Remove unused sqlite symbols
- HAVE_SQLITE3_KEY is no longer used in php-src
- SQLITE_ENABLE_COLUMN_METADATA is no longer used in php-src
Closes GH-4443
Peter Kokot [Fri, 19 Jul 2019 21:07:04 +0000 (23:07 +0200)]
Fix typos in FFI
Closes GH-4438
Christoph M. Becker [Fri, 19 Jul 2019 18:03:41 +0000 (20:03 +0200)]
Put oniguruma include path to proper CFLAGS
Christoph M. Becker [Fri, 19 Jul 2019 17:27:23 +0000 (19:27 +0200)]
Move Oniguruma related config stuff to where it belongs
Oniguruma is exclusively used by ext/mbstring, and only if mbregex is
enabled. Therefore it is unnecessary and confusing to have Oniguruma
related config stuff scattered elsewhere.
While we're at it, we also remove the referral to the bundled libonig
which is removed as of PHP 7.4.0, and the duplicated call to
`PHP_INSTALL_HEADERS()`.
Nikita Popov [Fri, 19 Jul 2019 08:58:00 +0000 (10:58 +0200)]
Merge Linux & Windows fwrite test
The test files are the same, just with a different OS check...
Dmitry Stogov [Fri, 19 Jul 2019 08:46:03 +0000 (11:46 +0300)]
Use run-time cache to avoid repeatable hash lookups in ZEND_DECLARE_CLASS_DELAYED
rjhdby [Wed, 13 Mar 2019 10:51:31 +0000 (13:51 +0300)]
Deprecate alternative array access syntax
RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
Dmitry Stogov [Fri, 19 Jul 2019 07:43:49 +0000 (10:43 +0300)]
Use run-time cache to avoid repeatable hash lookups when creating anonymous functions and classes
Dmitry Stogov [Fri, 19 Jul 2019 07:09:26 +0000 (10:09 +0300)]
ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW.
Peter Kokot [Thu, 18 Jul 2019 22:02:12 +0000 (00:02 +0200)]
Remove safe_mode directive when installing ext/phar
Closes GH-4436
Dmitry Stogov [Thu, 18 Jul 2019 13:46:25 +0000 (16:46 +0300)]
Merge common code
Nikita Popov [Thu, 18 Jul 2019 12:42:20 +0000 (14:42 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 18 Jul 2019 12:41:22 +0000 (14:41 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Abyr Valg [Wed, 17 Jul 2019 18:46:40 +0000 (21:46 +0300)]
Fixed bug #77946
Save multi_info_read() result into easy handle.
Christoph M. Becker [Thu, 18 Jul 2019 10:12:41 +0000 (12:12 +0200)]
Remove remaining lightnings from run-tests.php
The classic Windows console only supports the Unicode BMP, so it can't
handle the LIGHTNING MOOD character (U+1F5F2). It also seems that
common fonts do not support the LIGHTNING (U+2607) character, so a
general removal is appropriate.
However, Windows is already "ready for the future"[1], but PHP for
Windows is not (yet).
[1] <https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/>
Peter Kokot [Thu, 18 Jul 2019 10:11:19 +0000 (12:11 +0200)]
Remove duplicate socklen_t check
- Use Autoconf's default AC_CHECK_TYPES
Closes GH-4418
Nikita Popov [Thu, 18 Jul 2019 09:15:44 +0000 (11:15 +0200)]
Remove lightning
Windows is not quite ready for the future.
George Peter Banyard [Sun, 14 Jul 2019 19:47:01 +0000 (21:47 +0200)]
Convert E_STRICT into E_NOTICE for htmlentities() function
Christoph M. Becker [Thu, 18 Jul 2019 07:16:56 +0000 (09:16 +0200)]
Update NEWS and UPGRADING wrt. opcache.cache_id [ci skip]
Christoph M. Becker [Thu, 18 Jul 2019 07:06:10 +0000 (09:06 +0200)]
Use regedit to register event source
ext/win32std is unmaintained for years, so it is highly unlikely that
it is available. We therefore use regedit instead to register the
event source. We also remove the bundled syslog.reg, since it is of no
use, unless generated for the respective installation.
Peter Kokot [Thu, 18 Jul 2019 00:27:14 +0000 (02:27 +0200)]
Update changelogs
Peter Kokot [Thu, 18 Jul 2019 00:23:39 +0000 (02:23 +0200)]
Fix typo
Peter Kokot [Thu, 18 Jul 2019 00:21:39 +0000 (02:21 +0200)]
Remove unused defines
Used in php-src the past and today removed and not used anymore:
- HAVE_CURL_EASY_STRERROR
- HAVE_CURL_MULTI_STRERROR
- HAVE_NEW_MIME2TEXT
- HAVE_MBSTR_CN
- HAVE_MBSTR_JA
- HAVE_MBSTR_KR
- HAVE_MBSTR_RU
- HAVE_MBSTR_TW
Part of oniguruma which doesn't use these anymore
- NOT_RUBY
- HAVE_STDARG_PROTOTYPES
Unused:
- HAVE_MPIR
Closes GH-4427
Peter Kokot [Thu, 18 Jul 2019 00:18:14 +0000 (02:18 +0200)]
Update changelog
Peter Kokot [Thu, 18 Jul 2019 00:17:14 +0000 (02:17 +0200)]
Remove unused MISSING_MSGHDR_MSGFLAGS
Closes GH-4426
Peter Kokot [Thu, 18 Jul 2019 00:14:31 +0000 (02:14 +0200)]
Remove duplicate AC_PROG_CPP call
AC_PROG_CPP is already called in configure.ac.
Closes GH-4425
Peter Kokot [Thu, 18 Jul 2019 00:13:13 +0000 (02:13 +0200)]
Update changelog
Peter Kokot [Thu, 18 Jul 2019 00:11:19 +0000 (02:11 +0200)]
Remove unused HAVE_SHM_MMAP_ZERO and HAVE_SHM_MMAP_FILE
Closes GH-4424
Christoph M. Becker [Tue, 16 Jul 2019 19:14:57 +0000 (21:14 +0200)]
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.
Christoph M. Becker [Wed, 17 Jul 2019 17:25:36 +0000 (19:25 +0200)]
Revert "Remove Windows syslog script and syslog.reg"
This reverts commit
cc44bad1f6ded6a62c9bbe4d145b5b418aa775f4, since its
assumptions were not correct. Actually, the classic event logging is
still used by PHP, because Windows 7 is still to be supported for a
while. Without the respective registry entries, the event log entries
show an error message regarding missing ID descriptions.
Thanks to ab@php.net for hinting at this!
Obviously, the part depending on ext/win32std has still to be
overhauled, and further improvements are conceivable; we will address
this in due course.
Nikita Popov [Wed, 17 Jul 2019 13:59:22 +0000 (15:59 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 17 Jul 2019 13:59:05 +0000 (15:59 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 17 Jul 2019 13:58:29 +0000 (15:58 +0200)]
Fixed bug #69100
Nikita Popov [Wed, 17 Jul 2019 12:43:53 +0000 (14:43 +0200)]
Avoid duplicate fstat() for includes
By adding a flag to avoid forced fstat for includes. The two fstats
will happen back to back and we don't care about a possible
invalidation.
I was hoping to move this higher up in the stack and make the
ISREG check somewhere in fsizer of fixup, but this doesn't really
seem to be possible. E.g. an FP stdin handle will not be a regular
file but of course needs to be allowed. Additionally custom stream
wrappers may not implement this functionality.
Dmitry Stogov [Wed, 17 Jul 2019 11:03:48 +0000 (14:03 +0300)]
Avoid extra specialization for cold opcodes
Nikita Popov [Wed, 17 Jul 2019 09:56:00 +0000 (11:56 +0200)]
Use reported fstat filesize for PHP streams
Nikita Popov [Wed, 17 Jul 2019 09:49:10 +0000 (11:49 +0200)]
Revert "Avoid unused fstat() call"
This reverts commit
5a90dc77b8f244f603082aea022fadc0ce2c009c.
Let's try to go with the reverse direction here and actually trust
the reported size...
Nikita Popov [Wed, 17 Jul 2019 09:01:57 +0000 (11:01 +0200)]
Avoid unused fstat() call
If we're including a file via PHP streams, we're not going to trust
the reported file size anyway and populate in a loop -- so don't
bother determining the file size in the first place. Only do this
for non-tty HANDLE_FP now, which is the only case where this
information was used.
Dmitry Stogov [Wed, 17 Jul 2019 09:05:23 +0000 (12:05 +0300)]
Remove old hack
Nikita Popov [Wed, 17 Jul 2019 08:20:06 +0000 (10:20 +0200)]
Avoid double buffering in Zend streams
Disable buffering in PHP streams, to avoid storing and copying the
file contents twice.
This will call stream_set_option() on custom stream wrapper as
well, so the method needs to be implemented to avoid a warning.
Dmitry Stogov [Wed, 17 Jul 2019 06:12:01 +0000 (09:12 +0300)]
Added specialization for comparison instructions and QM_ASSIGN
Peter Kokot [Wed, 17 Jul 2019 01:54:54 +0000 (03:54 +0200)]
Fix typo
Peter Kokot [Wed, 17 Jul 2019 01:50:47 +0000 (03:50 +0200)]
Simplify functions checks in m4
- AC_CHECK_FUNCS already automatically defines belonging HAVE_function
symbols and executes given shell code.
Dmitry Stogov [Tue, 16 Jul 2019 21:52:26 +0000 (00:52 +0300)]
Separate "cold" and common unspecialized code
Peter Kokot [Tue, 16 Jul 2019 20:46:46 +0000 (22:46 +0200)]
Update changelog
Peter Kokot [Tue, 16 Jul 2019 20:39:09 +0000 (22:39 +0200)]
Remove unused build checks
- yp_get_default_domain was part of ext/yp
- functions checks produce HAVE_function_name symbols. These checks are
currently not used in php-src neither in the extensions out there.
- Removed symbols because they are not used in the code:
- HAVE_GCVT
- HAVE_PUTENV
- HAVE_PUTENV
- HAVE_SETVBUF
- HAVE_TEMPNAM
- HAVE_SIN (sin is also defined in C89 standard)
- HAVE_SETSOCKOPT
- HAVE_LOCKF
- HAVE_ISASCII
- HAVE_YP_GET_DEFAULT_DOMAIN (and other yp extension related unused checks)
- HAVE_LINK
- HAVE_USLEEP is already defined in Windows configuration header
- HAVE_LIBBIND has not been used in php-src for a while anymore
- HAVE_GETHOSTNAME is duplicated in Windows configuration header
Closes GH-4417
Dmitry Stogov [Tue, 16 Jul 2019 19:56:20 +0000 (22:56 +0300)]
Provide type info
Nikita Popov [Tue, 16 Jul 2019 15:17:19 +0000 (17:17 +0200)]
Remove ZEND_HANDLE_MAPPED
The buf/len members are now simply used in addition to the main
stream, without changing the handle kind.
Nikita Popov [Tue, 16 Jul 2019 14:50:22 +0000 (16:50 +0200)]
Drop free_filename field from zend_file_handle
free_filename was always zero.
Nikita Popov [Tue, 16 Jul 2019 14:40:54 +0000 (16:40 +0200)]
Introduce zend_stream_init_filename()
Avoid more ad-hoc initialization of zend_file_handle structures.
Nikita Popov [Tue, 16 Jul 2019 14:21:45 +0000 (16:21 +0200)]
Introduce zend_stream_init_fp() API
Reduce the amount of code that mucks around with zend_file_handle
initialization.
Dmitry Stogov [Tue, 16 Jul 2019 14:39:25 +0000 (17:39 +0300)]
Slit INC/DEC opcodes into hot/cold parts and remove specialized versioins for LONG_OR_DOUBLE.
Nikita Popov [Tue, 16 Jul 2019 13:53:41 +0000 (15:53 +0200)]
Remove unused _get_zval_ptr_cv_BP_VAR_UNSET function
To fix the macos -Werror build.
Nikita Popov [Tue, 16 Jul 2019 12:51:48 +0000 (14:51 +0200)]
Remove ZEND_HANDLE_FD
This handle type was unused.
Nikita Popov [Tue, 16 Jul 2019 11:27:41 +0000 (13:27 +0200)]
Fix bug #52752 by not using mmap() to lex files
Using mmap() is unsafe under concurrent modification. If the file
is truncated, access past the end of the file may occur, which will
generate a SIGBUS error. Even if the length does not change, the
contents may, which is a situation that the lexer certainly is not
prepared to deal with either.
Reproduce with test.php:
<?php
file_put_contents(__DIR__ . '/test.tpl',
'AAA<?php $string = "' .
str_repeat('A', mt_rand(1, 256 * 1024)) .
'"; ?>BBB' . "\r\n");
require_once __DIR__ . '/test.tpl';
And:
for ((n=0;n<100;n++)); do sapi/cli/php test.php & done
Christoph M. Becker [Tue, 16 Jul 2019 13:29:10 +0000 (15:29 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Convert short tag to standard tag in Zend test file
George Peter Banyard [Thu, 11 Jul 2019 14:06:41 +0000 (16:06 +0200)]
Convert short tag to standard tag in Zend test file
Closes GH-4389.
(cherry picked from commit
e6c2b288652cf9c8d0b92d2842d73b3eb2431860)
Christoph M. Becker [Tue, 16 Jul 2019 11:45:23 +0000 (13:45 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Update NEWS [ci skip]
Christoph M. Becker [Tue, 16 Jul 2019 11:44:13 +0000 (13:44 +0200)]
Update NEWS [ci skip]
Remi Collet [Tue, 16 Jul 2019 11:00:44 +0000 (13:00 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
move NEWS entry [ci skip]
Remi Collet [Tue, 16 Jul 2019 11:00:30 +0000 (13:00 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
move NEWS entry [ci skip]
Remi Collet [Tue, 16 Jul 2019 11:00:13 +0000 (13:00 +0200)]
move NEWS entry [ci skip]
Dmitry Stogov [Tue, 16 Jul 2019 10:50:25 +0000 (13:50 +0300)]
Replace deprecated conditions by ZEND_ASSERT.
Nikita Popov [Tue, 16 Jul 2019 10:07:09 +0000 (12:07 +0200)]
Use ZEND_HASH_FOREACH APIs in a few more places
Nikita Popov [Mon, 15 Jul 2019 15:26:26 +0000 (17:26 +0200)]
Support <?php followed by EOF
This is an annoying edge-case for canonicalization.
Nikita Popov [Tue, 16 Jul 2019 09:11:00 +0000 (11:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 16 Jul 2019 09:10:02 +0000 (11:10 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 16 Jul 2019 09:08:27 +0000 (11:08 +0200)]
Fixed bug #78297
Remi Collet [Tue, 16 Jul 2019 08:39:24 +0000 (10:39 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
next is 7.2.22
Remi Collet [Tue, 16 Jul 2019 08:39:03 +0000 (10:39 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
next is 7.2.22
Remi Collet [Tue, 16 Jul 2019 08:38:20 +0000 (10:38 +0200)]
next is 7.2.22
Nikita Popov [Tue, 16 Jul 2019 08:24:20 +0000 (10:24 +0200)]
Fix name collisions in fputcsv tests
Nikita Popov [Tue, 16 Jul 2019 08:21:38 +0000 (10:21 +0200)]
Canonicalize file-names in zip tests
There were a number of name collisions in there.
Dmitry Stogov [Tue, 16 Jul 2019 08:16:45 +0000 (11:16 +0300)]
Delay IS_UNDEF checks
Dmitry Stogov [Mon, 15 Jul 2019 22:54:22 +0000 (01:54 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed incorrect specialization (missed IS_INDIRECT handling)
Dmitry Stogov [Mon, 15 Jul 2019 22:52:11 +0000 (01:52 +0300)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fixed incorrect specialization (missed IS_INDIRECT handling)
Dmitry Stogov [Mon, 15 Jul 2019 22:50:10 +0000 (01:50 +0300)]
Fixed incorrect specialization (missed IS_INDIRECT handling)
George Peter Banyard [Mon, 15 Jul 2019 16:15:17 +0000 (18:15 +0200)]
Small typo and proto name fix
Closes GH-4415
Peter Kokot [Mon, 15 Jul 2019 16:00:04 +0000 (18:00 +0200)]
Remove win32/php_stdbool.h
File usage was removed via
33fc7d77d7d0f7c85025b8aa82d62b154c4bc71f.
Closes GH-4411
Peter Kokot [Mon, 15 Jul 2019 15:58:46 +0000 (17:58 +0200)]
Remove unused files
These were introduced in
504b9beae60a45e1b1e6466e97a6bd246dfc74f6
and their usages were removed via
4b3e19802385c5874eefd3ba4565f2efbc55dc96.
Closes GH-4410
Peter Kokot [Mon, 15 Jul 2019 15:57:11 +0000 (17:57 +0200)]
Remove Windows syslog script and syslog.reg
These were used on old Windows systems before Vista and also were
used together with unmaintained win32std extension.
https://docs.microsoft.com/en-us/windows/win32/eventlog/event-logging
Closes GH-4409
Peter Kokot [Mon, 15 Jul 2019 15:55:37 +0000 (17:55 +0200)]
Remove some *.dsp/*.dsw leftovers
Usage of this was removed via
4b3e19802385c5874eefd3ba4565f2efbc55dc96
Closes GH-4408
Nikita Popov [Mon, 15 Jul 2019 15:29:27 +0000 (17:29 +0200)]
Combine SKIP_TOKEN+RETURN_TOKEN into one macro
Nikita Popov [Mon, 15 Jul 2019 14:21:46 +0000 (16:21 +0200)]
Move shebang handling into the lexer
Instead of handling shebang lines by adjusting the file pointer in
individual SAPIs, move the handling into the lexer, where this is
both a lot simpler and more robust. Whether the shebang should be
skipped is controlled by CG(skip_shebang) -- we might want to do
that in more cases.
This fixed bugs #60677 and #78066.
Nikita Popov [Mon, 15 Jul 2019 13:20:36 +0000 (15:20 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 15 Jul 2019 13:19:43 +0000 (15:19 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Tue, 25 Jun 2019 10:09:47 +0000 (12:09 +0200)]
Fix bug #77124
This is a backport of
6fcae63f614d1ed4aaeaff7b13a7a4627b1f1312
to PHP 7.2.
Christoph M. Becker [Mon, 15 Jul 2019 09:43:09 +0000 (11:43 +0200)]
Sync mysqlnd version with PHP version
Since mysqlnd is solely developed in the php-src repository, it makes
not much sense to have its own version number, particularly since
nobody cares to update it. Therefore we use PHP's version number, but
stick with the "mysqlnd" prefix which can be important to distinguish
the mysqli driver (libmysqlclient vs. mysqlnd).
Remi Collet [Mon, 15 Jul 2019 12:17:23 +0000 (14:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
typo [ci skip]
Remi Collet [Mon, 15 Jul 2019 12:17:13 +0000 (14:17 +0200)]
typo [ci skip]
Remi Collet [Mon, 15 Jul 2019 12:11:57 +0000 (14:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78269 password_hash uses weak options for argon2
Fix #78269 password_hash uses weak options for argon2
Remi Collet [Mon, 15 Jul 2019 12:11:38 +0000 (14:11 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix #78269 password_hash uses weak options for argon2
Remi Collet [Mon, 15 Jul 2019 12:11:30 +0000 (14:11 +0200)]
Fix #78269 password_hash uses weak options for argon2
Remi Collet [Mon, 15 Jul 2019 12:10:38 +0000 (14:10 +0200)]
Fix #78269 password_hash uses weak options for argon2
Nikita Popov [Mon, 15 Jul 2019 11:49:29 +0000 (13:49 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4