Commit Graph

1447 Commits

Author SHA1 Message Date
Joe Watkins
4e3a4c119d
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73994 incorrect arginfo for unpack
2017-01-26 06:58:53 +00:00
Joe Watkins
76a7470160
Fixed bug #73994 incorrect arginfo for unpack 2017-01-26 06:58:08 +00:00
Joe Watkins
5b23f5d73a
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:48 +00:00
Joe Watkins
c39f71ba9f
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:34 +00:00
Joe Watkins
b8215c0817
Fixed #72974 imap is undefined service on AIX 2017-01-09 05:15:21 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Sara Golemon
5c919ee30b Use new param API in standard/basic_functions 2016-12-30 16:13:14 -08:00
Dmitry Stogov
72616c5ede Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed arginfo
2016-12-19 11:13:21 +03:00
Dmitry Stogov
6ea44908fb Fixed arginfo 2016-12-19 11:13:02 +03:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Dmitry Stogov
628cde2fae Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:19:00 +03:00
Dmitry Stogov
d769a020df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:18:22 +03:00
Dmitry Stogov
97b65cc9c2 Fixed memory leaks in parse_ini_file() 2016-11-18 16:17:52 +03:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Andrea Faulds
d8f27b2be8 Merge branch 'DedupNANINF' 2016-10-26 16:46:36 +01:00
Andrea Faulds
1a512eed44 Move utf8_encode and utf8_decode to ext/standard 2016-10-17 15:39:02 +01:00
Nikita Popov
02ba9d71ab Unwrap reference returns in cufa etc 2016-09-30 22:10:01 +02:00
Andrea Faulds
fc5497cb92 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-11 22:46:20 +01:00
Andrea Faulds
d690014bf3 Remove zpp fallback code (always use Fast ZPP)
Squashed commit of the following:

commit 3e27fbb3d2
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Sep 11 19:14:37 2016 +0100

    Keep dummy FAST_ZPP macro for compatibility

commit 8a7cfd00de
Author: Andrea Faulds <ajf@ajf.me>
Date:   Mon Sep 5 22:36:03 2016 +0100

    Remove FAST_ZPP macro and plain zpp fallback code
2016-09-11 22:44:46 +01:00
Xinchen Hui
434ae90e85 Fixed bug #72920 (Accessing a private constant using constant() creates an exception AND warning) 2016-08-22 23:44:38 +08:00
Anatol Belski
872028de20 fix TS issues with url rewrite globals 2016-08-20 22:41:06 +02:00
Yasuo Ohgaki
a53a6b3fb4 Fix URL rewriter issues 2016-08-11 08:31:48 +09:00
Leigh
9a9004318f Preserve BC for rand() AND mt_rand() where min > max 2016-08-10 23:32:32 +01:00
Xinchen Hui
6e16ea4135 Fixed arginfo 2016-07-20 18:09:17 +08:00
Xinchen Hui
e4af29b0b7 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed arginfo
2016-07-20 18:07:18 +08:00
Xinchen Hui
9ebc96116b Fixed arginfo 2016-07-20 18:07:02 +08:00
Stanislav Malyshev
70d6ce3368 Merge branch 'PHP-7.0'
* PHP-7.0: (27 commits)
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not allow reading past error read
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  update NEWS
  Fixed bug #72570 Segmentation fault when binding parameters on a query without placeholders
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72551 and bug #72552 - check before converting size_t->int
  Fix bug #72541 - size_t overflow lead to heap corruption
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  Fix for bug #72513
  CS fix and comments with bug ID
  ...

Conflicts:
	ext/standard/basic_functions.c
2016-07-19 01:44:14 -07:00
Stanislav Malyshev
b00f8f2a5b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  5.6.24RC1
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	Zend/zend_virtual_cwd.c
	ext/bz2/bz2.c
	ext/exif/exif.c
	ext/session/session.c
	ext/snmp/snmp.c
	ext/standard/basic_functions.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 01:39:28 -07:00
Stanislav Malyshev
4d0565b5ba Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	ext/bz2/bz2.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 00:53:08 -07:00
Leigh
ab834f472f Merge RNG fixes RFC. PR #1986
* rng-fixes:
  Fix legacy mode RAND_RANGE and 32/64-bit consistency
  Fix crypt salt not being converted to b64
  Make mode selection part of mt_srand()
  Use zend_bitset
  Improve array_rand distribution
  Fix some insecure usages of php_rand
  Alias rand to mt_rand
  Fix RAND_RANGE for mt_rand
  Fix mt_rand impl. Provide legacy impl. access.
  Split rand and mt_rand into separate files
2016-07-17 16:05:10 +00:00
Martin Vobruba
2809a676b5 Pass error severity to SAPI modules and raise corresponding error level in Apache 2016-07-11 09:34:48 +02:00
Stanislav Malyshev
98b9dfaec9 Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
  and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
  local environment
2016-07-10 16:21:11 -07:00
Adam Saponara
e4f7f00a77 Add optind param to getopt 2016-07-08 16:53:24 +02:00
Leigh
69e7d8dcd5 Make mode selection part of mt_srand()
The mode of operation is intrinsically linked to seeding, so this makes a lot of sense
2016-07-07 15:14:06 +01:00
Leigh
6d6ef7aacc Alias rand to mt_rand 2016-07-05 15:09:49 +01:00
Anatol Belski
5920445a5f Merge branch 'PHP-7.0'
* PHP-7.0:
  fix possible optimization bug
2016-07-05 15:04:10 +02:00
Anatol Belski
4576c41291 fix possible optimization bug 2016-07-05 14:57:16 +02:00
Leigh
7981a294bd Fix mt_rand impl. Provide legacy impl. access. 2016-07-05 11:54:07 +01:00
Aaron Piotrowski
24237027bc Merge branch 'throw-error-in-extensions' 2016-07-05 02:08:39 -05:00
Aaron Piotrowski
d9a9cf8eca Merge branch 'master' into iterable 2016-07-03 22:42:10 -05:00
Dmitry Stogov
0cfb47651c Fixed compilation warnings 2016-06-28 11:37:51 +03:00
Dmitry Stogov
adc95c5114 Fixed compilation warnings 2016-06-23 12:47:06 +03:00
Anatol Belski
3d3f11ede4 Fixed the UTF-8 and long path support in the streams on Windows.
Since long the default PHP charset is UTF-8, however the Windows part is
out of step with this important point. The current implementation in PHP
doesn't technically permit to handle UTF-8 filepath and several other
things. Till now, only the ANSI compatible APIs are being used. Here is more
about it

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317752%28v=vs.85%29.aspx

The patch fixes not only issues with multibyte filenames under
incompatible codepages, but indirectly also issues with some other multibyte
encodings like BIG5, Shift-JIS, etc. by providing a clean way to access
filenames in UTF-8. Below is a small list of issues from the bug tracker,
that are getting fixed:

https://bugs.php.net/63401
https://bugs.php.net/41199
https://bugs.php.net/50203
https://bugs.php.net/71509
https://bugs.php.net/64699
https://bugs.php.net/64506
https://bugs.php.net/30195
https://bugs.php.net/65358
https://bugs.php.net/61315
https://bugs.php.net/70943
https://bugs.php.net/70903
https://bugs.php.net/63593
https://bugs.php.net/54977
https://bugs.php.net/54028
https://bugs.php.net/43148
https://bugs.php.net/30730
https://bugs.php.net/33350
https://bugs.php.net/35300
https://bugs.php.net/46990
https://bugs.php.net/61309
https://bugs.php.net/69333
https://bugs.php.net/45517
https://bugs.php.net/70551
https://bugs.php.net/50197
https://bugs.php.net/72200
https://bugs.php.net/37672

Yet more related tickets can for sure be found - on bugs.php.net, Stackoverflow
and Github. Some of the bugs are pretty recent, some descend to early
2000th, but  the user comments in there last even till today. Just for example,
bug #30195 was opened in 2004, the latest comment in there was made in 2014. It
is certain, that these bugs descend not only to pure PHP use cases, but get also
redirected from the popular PHP based projects. Given the modern systems (and
those supported by PHP) are always based on NTFS, there is no excuse to keep
these issues unresolved.

The internalization approach on Windows is in many ways different from
UNIX and Linux, while it supports and is based on Unicode. It depends on the
current system code page, APIs used and exact kind how the binary was compiled
The locale doesn't affect the way Unicode or ANSI API work. PHP in particular
is being compiled without _UNICODE defined and this is conditioned by the
way we handle strings. Here is more about it

https://msdn.microsoft.com/en-us/library/tsbaswba.aspx

However, with any system code page ANSI functions automatically convert
paths to UTF-16. Paths in some encodings incompatible with the
current system code page, won't work correctly with ANSI APIs. PHP
till now only uses the ANSI Windows APIs.

For example, on a system with the current code page 1252, the paths
in cp1252 are supported and transparently converted to UTF-16 by the
ANSI functions. Once one wants to handle a filepath encoded with cp932 on
that particular system, an ANSI or a POSIX compatible function used in
PHP will produce an erroneous result. When trying to convert that cp932 path
to UTF-8 and passing to the ANSI functions, an ANSI function would
likely interpret the UTF-8 string as some string in the current code page and
create a filepath that represents every single byte of the UTF-8 string.
These behaviors are not only broken but also disregard the documented
INI settings.

This patch solves the issies with the multibyte paths on Windows by
intelligently enforcing the usage of the Unicode aware APIs. For
functions expect Unicode (fe CreateFileW, FindFirstFileW, etc.), arguments
will be converted to UTF-16 wide chars. For functions returning Unicode
aware data (fe GetCurrentDirectoryW, etc.), resulting wide string is
converted back to char's depending on the current PHP charset settings,
either to the current ANSI codepage (this is the behavior prior to this patch)
or to UTF-8 (the default behavior).

In a particular case, users might have to explicitly set
internal_encoding or default_charset, if filenames in ANSI codepage are
necessary. Current tests show no regressions and witness that this will be an
exotic case, the current default UTF-8 encoding is compatible with any
supported system. The dependency libraries are long switching to Unicode APIs,
so some tests were also added for extensions not directly related to streams.
At large, the patch brings over 150 related tests into the core. Those target
and was run on various environments with European, Asian, etc. codepages.
General PHP frameworks was tested and showed no regressions.

The impact on the current C code base is low, the most places affected
are the Windows only places in the three files tsrm_win32.c, zend_virtual_cwd.c
and plain_wrapper.c. The actual implementation of the most of the wide
char supporting functionality is in win32/ioutil.* and win32/codepage.*,
several  low level functionsare extended in place to avoid reimplementation for
now. No performance impact was sighted. As previously mentioned, the ANSI APIs
used prior the patch perform Unicode conversions internally. Using the
Unicode  APIs directly while doing custom conversions just retains the status
quo. The ways to optimize it are open (fe. by implementing caching for the
strings converted to wide variants).

The long path implementation is user transparent. If a path exceeds the
length of _MAX_PATH, it'll be automatically prefixed with \\?\. The MAXPATHLEN
is set to 2048 bytes.

Appreciation to Pierre Joye, Matt Ficken, @algo13 and others for tips, ideas
and testing.

Thanks.
2016-06-20 12:45:39 +02:00
Nikita Popov
1b29e0cacd Switch zend_print_zval_r to use smart_str
Instead of directly writing to stdout. This allows doing a print_r
into a string, without using output buffering.

The motivation for this is bug #67467: print_r() in return mode
will still dump the string to stdout (causing a potential information
leak) if a fatal error occurs.
2016-06-13 18:04:22 +02:00
Aaron Piotrowski
771e5cc247 Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error 2016-06-13 09:02:17 -05:00
Aaron Piotrowski
0e221cb3eb Add is_iterable() function 2016-06-03 17:42:12 -05:00
Jani Ollikainen
0a04f61448 Added backwards compability with php_log_err by using macro 2016-06-02 13:25:29 +02:00
Jani Ollikainen
3edf7d960c Logging to syslog with dynamic error levels (related to #49467) 2016-06-02 13:25:29 +02:00
Xinchen Hui
02571c2a7b Merge branch 'PHP-7.0' 2016-05-31 07:24:22 -07:00
Xinchen Hui
f2a814df33 Fixed bug #72300 (ignore_user_abort(false) has no effect) 2016-05-31 07:24:02 -07:00
Nikita Popov
5595dd5ffa Revert code to use DUP instead of COPY
In a1c405e0c5 next to the actual fix
I have also switched some (effective) ZVAL_DUPs to ZVAL_COPYs. I'm
reverting this part as those were probably there for a reason
(presumably issues with non-atomic refcounting on ZTS).
2016-04-29 22:02:31 +02:00
Nikita Popov
a1c405e0c5 Fix usages of zend_update_constant_ex
If an in-place update in an external zval is performed, it needs
to incref'd beforehand, not afterwards.
2016-04-29 14:06:39 +02:00
Dmitry Stogov
6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Nikita Popov
d3ed75b9eb Remove HAVE_CRYPT checks
We always provide a crypt implementation. HAVE_CRYPT is only
relevant as to whether the crypt() C function exists.
2016-03-25 21:09:47 +01:00
Xinchen Hui
0e5fa32883 Merge branch 'PHP-7.0' 2016-03-25 12:35:20 +08:00
Xinchen Hui
1929fc9b16 Fixed bug #71891 (header_register_callback() and register_shutdown_function())
Actually, this fixed the memleak not the behavior(it is expected
behavior that "shutdown" is not outputed)
2016-03-25 12:34:22 +08:00
Andrea Faulds
1c1e20d771 Deduplicate NAN/INF portability, move to Zend 2016-03-20 01:32:44 +00:00
Rouven Weßling
a61029b155 Replace usage of php_int32 and php_uint32 with int32_t and uint32_t 2016-02-04 11:57:41 +01:00
Stanislav Malyshev
ea35de6e31 Merge branch 'PHP-7.0'
* PHP-7.0: (35 commits)
  fix tests
  update NEWS
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71475: openssl_seal() uninitialized memory usage
  Fixed bug #71488: Stack overflow when decompressing tar archives
  fix tests
  fix wrong gc sequence
  revert the API string as well
  update NEWS
  Revert "Fix #70720"
  sync NEWS
  reset ext/session to the state of 7.0.2
  update NEWS
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  ...
2016-02-01 20:46:06 -08:00
Stanislav Malyshev
c631f1ee2b Merge branch 'PHP-7.0.3' into PHP-7.0
* PHP-7.0.3: (35 commits)
  fix tests
  update NEWS
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71475: openssl_seal() uninitialized memory usage
  Fixed bug #71488: Stack overflow when decompressing tar archives
  fix tests
  fix wrong gc sequence
  revert the API string as well
  update NEWS
  Revert "Fix #70720"
  sync NEWS
  reset ext/session to the state of 7.0.2
  update NEWS
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  ...

Conflicts:
	configure.in
	ext/session/tests/bug69111.phpt
	main/php_version.h
2016-02-01 20:45:49 -08:00
Stanislav Malyshev
309ead112f Merge branch 'PHP-5.5.32' into PHP-5.6.18
* PHP-5.5.32:
  Fixed bug #71488: Stack overflow when decompressing tar archives
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  Fix bug #71459 - Integer overflow in iptcembed()
  Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
  Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata()
  Fix bug #71335: Type Confusion in WDDX Packet Deserialization
  Fix bug #71354 - remove UMR when size is 0
2016-02-01 18:32:31 -08:00
Anatol Belski
f4d7bbf4ac backport the escapeshell* functions hardening branch 2016-01-28 13:45:43 +01:00
Xinchen Hui
506d5fe4df Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71442 (forward_static_call crash)
2016-01-25 12:13:35 +08:00
Xinchen Hui
e7f2c5bd6a Fixed bug #71442 (forward_static_call crash) 2016-01-25 12:13:22 +08:00
Anatol Belski
22a5ccab72 Follow up on bug #71270
Using the max allowed command line length for an underlying OS.
2016-01-12 14:41:44 +01:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
9b148d31d3 Fixed bug #71100 (long2ip() doesn't accept integers in strict mode) 2015-12-14 14:55:44 +08:00
Xinchen Hui
7e7c2c062f Merge branch 'PHP-7.0' 2015-11-24 13:46:04 +08:00
Xinchen Hui
e637ead6ed Merge branch 'PHP-5.6' into PHP-7.0 2015-11-24 13:45:32 +08:00
Xinchen Hui
e6b46dc2ff Fixed bug #70960 (ReflectionFunction for array_unique returns wrong number of parameters) 2015-11-24 13:45:16 +08:00
Xinchen Hui
cd6dda1679 Merge branch 'PHP-7.0' 2015-11-11 12:33:13 +08:00
Xinchen Hui
c3260b66c9 Revert "Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)"
This reverts commit d6c527830e.
2015-11-11 12:06:38 +08:00
Xinchen Hui
607e17e269 Merge branch 'PHP-7.0' 2015-11-11 11:35:09 +08:00
Xinchen Hui
d6c527830e Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)
Maybe we should introduce a new zend_hash_safe_apply which always reload
the ht->arData to make sure won't segfault the ht is grew?
2015-11-11 11:34:11 +08:00
Ferenc Kovacs
54670c8f05 initialize *str 2015-10-12 21:36:21 +02:00
Ferenc Kovacs
d221821cee calling getenv() without arguments should return the environment variables as an array 2015-10-12 21:27:07 +02:00
Dmitry Stogov
6571038093 Merge branch 'PHP-7.0'
* PHP-7.0:
  Correct intdiv() argument names and description
2015-10-09 00:42:26 +03:00
Andrea Faulds
fa23bebe94 Correct intdiv() argument names and description 2015-10-08 15:45:22 +01:00
Ferenc Kovacs
1e66f1b9ad Merge branch 'pr-1204'
* pr-1204:
  no need for default value
  allow passing null as the third param
  Implemented FR #55716 - Add an option to pass a custom stream context
2015-10-08 10:23:24 +02:00
Andrey Hristov
be6546fac9 Add support for parameters to tick functions, on C level. This is only
for extensions that want to use register tick functions. Userland tick
functions are unaffected.
2015-09-28 11:21:17 +02:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Xinchen Hui
fd5e0dc3c6 Fixed bug #70342 (changing configuration with ignore_user_abort(true) isn't working) 2015-08-24 21:09:16 +08:00
Tjerk Meesters
0bd7d7a369 Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS for #70157
  Fixed #70157 parse_ini_string() segmentation fault with INI_SCANNER_TYPED
2015-08-15 16:49:30 +08:00
Tjerk Meesters
0d7159d26d Fixed #70157 parse_ini_string() segmentation fault with INI_SCANNER_TYPED 2015-08-15 15:10:34 +08:00
Remi Collet
e811770a68 Fix #70112 RFE Allow dirname to go up various times 2015-07-27 15:23:04 +02:00
Rasmus Lerdorf
73773c2175 unserialize() takes a 2nd optional arg and it can't be a bool 2015-07-15 09:59:31 -07:00
Rasmus Lerdorf
f2249bf95a php_uname has an optional arg 2015-06-30 09:55:00 -07:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Rasmus Lerdorf
01ceb0f7fa 2nd arg of sprintf is optional 2015-06-28 18:08:22 -07:00
Rasmus Lerdorf
7ceb47477d 3rd arg to stream_set_timeout is optional
ignore_user_abort() should take a bool not a string
2015-06-25 10:31:37 -07:00
Rasmus Lerdorf
56b0d6f3a0 Wrong arginfo on assert
(not adding types, just fixing a missing arg)
2015-06-23 22:41:41 -04:00
Anatol Belski
360d8fd712 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix handling VAR vs VAR= in putenv
2015-05-21 08:22:30 +02:00
Anatol Belski
ad4d022bdf Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix handling VAR vs VAR= in putenv
2015-05-21 08:21:53 +02:00
Anatol Belski
75286ece1a fix handling VAR vs VAR= in putenv
using _putenv_s eliminates behavior diff in TS/NTS
2015-05-21 08:19:54 +02:00
Dmitry Stogov
f69b30eaae Partial revert of 6a819bba40. 2015-05-13 09:43:05 +03:00
Stanislav Malyshev
5a1bef8eef Merge branch 'PHP-5.6'
* PHP-5.6:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	Zend/zend_alloc.c
	Zend/zend_operators.c
	ext/ftp/ftp.c
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/dir.c
	ext/standard/file.c
	ext/standard/pack.c
	ext/standard/string.c
	main/rfc1867.c
2015-05-12 15:00:24 -07:00
Stanislav Malyshev
587ddf6ddc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/standard/pack.c
2015-05-12 14:26:06 -07:00
Stanislav Malyshev
c08f9c2c78 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/pack.c
	ext/standard/tests/dir/opendir_variation1-win32.phpt
2015-05-12 14:24:15 -07:00
Julien Pauli
6a819bba40 Fix for #66048 2015-05-12 16:15:01 +02:00
Stanislav Malyshev
be9b2a95ad Fixed bug #69418 - more s->p fixes for filenames 2015-05-10 02:09:38 -07:00
Leigh
5f1b83e9bb Improve CSPRNG implementation 2015-05-09 21:57:59 +02:00
SammyK
bc54d139aa Initial implementation for CSPRNG API 2015-05-09 21:57:50 +02:00
Dmitry Stogov
49cf7c5d12 Don't propogate "fake" EX(called_scope) and EX(This) into each internal function.
They need quite seldom and it's cheaper to get them from corresponfing upper stack frame.
2015-04-23 12:16:37 +03:00
Masaki Kagaya
8d219f5307 apply a patch 2015-04-14 21:17:08 +09:00
Dmitry Stogov
ea09a9fa32 Convert fatal errors into EngineExceptions
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Ferenc Kovacs
fd01b47b8e Implemented FR #55716 - Add an option to pass a custom stream context 2015-03-30 01:09:07 +02:00
Anatol Belski
2accf544cb ifdef win only api 2015-03-29 13:18:25 +02:00
Kalle Sommer Nielsen
43457f960f Drop old VC support (VC <= 9), for dns.c, this means that DNS_TYPE_NAPTR always is available 2015-03-29 06:57:11 +02:00
Anatol Belski
663074b6b1 cleanup mod version macros and mod defs, round x 2015-03-23 21:30:22 +01:00
Stanislav Malyshev
6632684e03 Fix bug #69207 - move_uploaded_file allows nulls in path 2015-03-17 16:30:57 -07:00
Stanislav Malyshev
3477568b4e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix tests
  Fix bug #69207 - move_uploaded_file allows nulls in path
2015-03-17 12:58:00 -07:00
Stanislav Malyshev
e55e40ca66 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69207 - move_uploaded_file allows nulls in path
2015-03-17 12:48:37 -07:00
Stanislav Malyshev
1291d6bbee Fix bug #69207 - move_uploaded_file allows nulls in path 2015-03-17 12:47:58 -07:00
Daniel Lowrey
2dec21634c Revert "Add stream_socket_crypto_info() function"
This reverts commit 13acb7ec65.

With the added capability to negotiate application layer protocols
via the TLS ALPN extension userland needs a method to access the
negotiated protocol on a given stream. The reverted commit added
a new stream_socket_crypto_info() function for this purpose.

This original approach was discarded in favor of using the
already-existing stream_get_meta_data() API which specifically
exists for just such purposes and requires the addition of no new
functions.
2015-03-09 23:15:57 -06:00
Stanislav Malyshev
33ef5c47a5 Merge branch 'pull-request/1135'
* pull-request/1135:
  Return void like other functions
  Use zend_parse_parameters_none()
  Implemented FR #45235 A way to clear or reset the results for error_get_last()
2015-03-08 17:26:38 -07:00
Daniel Lowrey
b5d97140c0 Merge branch 'tls-alpn'
* tls-alpn:
  Improve test to target specific issue
  Misc updates/cleanup
  Add TLS ALPN extension support in crypto client/server streams
  Add stream_socket_crypto_info() function
  Update for compatibility with newer openssl libs
2015-03-04 13:56:58 -07:00
Reeze Xia
916709cf85 Return void like other functions 2015-03-03 19:13:51 +08:00
Reeze Xia
c6cebca1e3 Use zend_parse_parameters_none() 2015-03-03 18:49:49 +08:00
Reeze Xia
f97251adec Add missing zend_parse_parameters_none() for flush() 2015-03-03 18:37:47 +08:00
Reeze Xia
908542c34e Implemented FR #45235 A way to clear or reset the results for error_get_last() 2015-03-03 17:48:03 +08:00
Daniel Lowrey
13acb7ec65 Add stream_socket_crypto_info() function 2015-02-28 17:41:29 -05:00
Reeze Xia
968a9f4807 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #69141 Missing arguments in reflection info for some builtin functions
2015-02-28 16:43:41 +08:00
Reeze Xia
1b240ff9e3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69141 Missing arguments in reflection info for some builtin functions
2015-02-28 16:40:06 +08:00
Reeze Xia
f824f91ac9 Fixed bug #69141 Missing arguments in reflection info for some builtin functions
This include:

- setcookie (missing "httponly")
- setrawcookie (missing "httponly")
- spl_autoload_register (missing 2 optional params)
- mktime  (missing "is_dst")
- gmmktime (missing "is_dst")
2015-02-28 16:37:14 +08:00
Nikita Popov
b41b229d78 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-27 23:23:49 +01:00
Дмитрий Пацура
e9c6798721 Fix ARG_INFO for levenshtein
This can work with 2 parameters (require)

refs http://php.net/manual/ru/function.levenshtein.php
refs https://github.com/phalcon/zephir/issues/753
2015-02-27 23:23:24 +01:00
Дмитрий Пацура
5806e370d2 Fix ARG_INFO for levenshtein
This can work with 2 parameters (require)

refs http://php.net/manual/ru/function.levenshtein.php
refs https://github.com/phalcon/zephir/issues/753
2015-02-27 23:15:35 +01:00
Dmitry Stogov
745504ea2a Make current() and key() receive argument by value. 2015-02-24 17:40:25 +03:00
Ferenc Kovacs
78bb5091a3 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  update 5.6.6 release date in NEWS
  Fix bug #69033 (Request may get env. variables from previous requests if PHP works as FastCGI)
2015-02-18 16:34:02 +01:00
Ferenc Kovacs
68128efa4b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #69033 (Request may get env. variables from previous requests if PHP works as FastCGI)
2015-02-18 16:32:23 +01:00
Ferenc Kovacs
08b6fe9ef1 Fix bug #69033 (Request may get env. variables from previous requests if PHP works as FastCGI) 2015-02-18 16:24:09 +01:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Xinchen Hui
da7d94cd73 Merge branch 'PHP-5.6'
Conflicts:
	ext/soap/soap.c
	ext/standard/basic_functions.c
	ext/zlib/zlib.c
2015-02-13 13:28:24 +08:00
Xinchen Hui
adc4265792 Merge branch 'PHP-5.5' into PHP-5.6 2015-02-13 13:12:44 +08:00
Xinchen Hui
68ab716f18 Fixed #69015 (php-cgi's getopt does not see $argv)
No test script is added because of complicated
2015-02-13 12:53:34 +08:00
Bob Weinand
fc444fbc70 Shut up, my lovely compiler; I do not like your warnings
Conflicts:
	Zend/zend_object_handlers.c
2015-02-09 11:23:35 +08:00
Nikita Popov
ca11bc0325 Remove set_socket_blocking 2015-01-17 18:26:45 +01:00
Nikita Popov
a60efc5e11 Remove set_magic_quotes_runtime
And the alias magic_quotes_runtime
2015-01-17 18:26:45 +01:00
Xinchen Hui
484216e3c6 Fixed key length 2015-01-16 00:52:54 -05:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Dmitry Stogov
7b4808a647 Fixed bug #68636 (setlocale no longer returns current value per category). 2015-01-09 01:41:13 +03:00
Xinchen Hui
c24125e2f9 Micro optimization 2014-12-21 23:16:25 -05:00