Commit Graph

556 Commits

Author SHA1 Message Date
Stanislav Malyshev
43b426fbc4 Merge branch 'pull-request/1106' into PHP-5.5
* pull-request/1106:
  Fix #67626
2015-03-08 22:52:21 -07:00
Julien Pauli
c4c3dca302 Fix #67626 2015-02-20 16:07:40 +01:00
Nayana Hettiarachchi
5446377c6b Conflicts:
main/streams/memory.c
2015-02-05 16:32:30 +08:00
Stanislav Malyshev
e5e251b023 fix group name handling 2015-01-31 23:47:03 -08:00
Bob Weinand
b8461eb9ac Fix call after close if multiple filters are attached 2015-01-26 22:47:35 +01:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
mcq8
86f1875536 Fix bug #68532: convert.base64-encode omits padding bytes 2014-12-12 16:42:38 +01:00
Anatol Belski
c1ec815fae add include for missing usleep proto 2014-12-01 08:27:46 +01:00
Anatol Belski
f4a0e601ee C89 compat 2014-12-01 08:24:44 +01:00
mcq8
04808aa7e1 Added test and review suggestion 2014-11-30 16:38:20 -08:00
mcq8
6eaa4d01d3 Fix bug #68335: rmdir doesnt work with file:// stream wrapper 2014-11-30 16:38:13 -08:00
Anatol Belski
46aa2c396b increase the polling period to not to break existing behaviours 2014-09-29 17:27:24 +02:00
Anatol Belski
0c982798e0 Fixed bug #51800 proc_open on Windows hangs forever
This loop can block for some minutes, theoretically. Practially
however, this is a 99% non issue for a normal use case. This is
required because read() is synchronous. The PHP streams API wants
to fill its internal buffers, therefore it might try to read some
more data than user has demanded. Also, for a case where we want
to read X bytes, but neither enough data nor EOF arrives, read()
will block until it could fill the buffer. If a counterpart station
runs slowly or delivers not all the data at once, read() would
still be waiting. If we quit too early, we possibly could loose
some data from the pipe. Thus it has to emulate the read()
behaviour, but obviously not completely, just to some grade.

Reading big data amount is for sure an issue on any platforms, it
depends on the pipe buffer size, which is controlled by the system.
On Windows, the buffer size seems to be way too small, which causes
buffer congestion and a dead lock. It is essential to read the pipe
descriptors simultaneously and possibly in the same order as the
opposite writes them.

Thus, this will work with smaller buffer data sizes passed through
pipes. As MSDN states, anonymous pipes don't support asynchronous
operations. Neither anonymous pipes do support select() as they are
not SOCKETs but file descriptors. Consequently - bigger data sizes
will need a better solution based on threads. However it is much
more expencive. Maybe a better solution could be exporting a part
of the internal doing as a userspace function which could perform
some kind of lookahead operation on the pipe descriptor.

This is just the first stone, depending on the user feedback we
might go for further improvements in this area.
2014-09-29 16:24:34 +02:00
Chris Wright
30a73658c6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix stream_select() issue with OpenSSL buffer

Conflicts:
	ext/openssl/xp_ssl.c
2014-08-27 16:01:18 +01:00
Chris Wright
32be79dcfa Fix stream_select() issue with OpenSSL buffer
Ensure data from OpenSSL internal buffer has been
transfered to PHP stream buffer before a select()
emulation operation is performed

Addresses bug #65137
https://bugs.php.net/bug.php?id=65137

Conflicts:
	ext/openssl/xp_ssl.c
2014-08-27 13:25:50 +01:00
Stanislav Malyshev
5addf223d5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65701: Do not use cache for file file copy
2014-04-20 15:25:03 -07:00
Boro Sitnikovski
a18cec1b86 Fix bug #65701: Do not use cache for file file copy 2014-04-20 15:22:44 -07:00
Michael Wallner
bbd25ca01f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix Bug #66736 	fpassthru broken
2014-04-03 10:40:20 +02:00
Michael Wallner
d08b4dbf23 Fix Bug #66736 fpassthru broken 2014-04-03 10:40:06 +02:00
Michael Wallner
f453917f62 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61019 (Out of memory on command stream_get_contents)
2014-04-02 15:37:50 +02:00
Michael Wallner
1ec83d44a1 Fixed bug #61019 (Out of memory on command stream_get_contents) 2014-04-02 15:36:39 +02:00
Michael Wallner
af147ac9b7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64330
2014-04-02 11:10:59 +02:00
Michael Wallner
91a9d24aa3 Fix bug #64330
stream_socket_server() creates wrong Abstract Namespace UNIX sockets
2014-04-02 11:09:26 +02:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Anatol Belski
da62fd5ed8 Fixed bug #65486 mysqli_poll() is broken on Win x64
While this issue is visible in mysqli_poll() functions, the cause
lays deeper in the stream to socket casting API. On Win x64 the
SOCKET datatype is a 64 or 32 bit unsigned, while on Linux/Unix-like
it's 32 bit signed integer. The game of casting 32 bit var to/from
64 bit pointer back and forth is the best way to break it.

Further more, while socket and file descriptors are always integers
on Linux, those are different things using different APIs on Windows.
Even though using integer instead of SOCKET might work on Windows, this
issue might need to be revamped more carefully later. By this time
this patch is tested well with phpt and apps and shows no regressions,
neither in mysqli_poll() nor in any other parts.
2013-12-12 10:17:01 +01:00
Michael Wallner
a48d82d238 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61645 (fopen and O_NONBLOCK)
  fix possibly uninitialized value
2013-12-06 10:33:10 +01:00
Michael Wallner
b5f5bff965 Fixed bug #61645 (fopen and O_NONBLOCK)
if a mode like "rn" was passed to fopen(), then
php_stream_parse_fopen_modes() would assign O_WRONLY to
flags, because O_NONBLOCK tainted flags for the r/w/+ check
2013-12-06 10:29:24 +01:00
Matteo Beccati
1dc7d0da08 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Properly fixed bug #63186 on NetBSD == 6.0
2013-07-19 09:39:53 +02:00
Matteo Beccati
2b9d42433f Properly fixed bug #63186 on NetBSD == 6.0 2013-07-19 09:37:39 +02:00
Anatol Belski
f5b9d87fb9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix possible resource leak and make sure there's something to qsort()
2013-07-10 13:31:22 +02:00
Anatol Belski
29ac511b8a fix possible resource leak and make sure there's something to qsort() 2013-07-10 13:00:47 +02:00
Matteo Beccati
6f594514b0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63186 (compile failure on netbsd)
2013-06-14 16:55:12 +02:00
Matteo Beccati
02f552ceca Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63186 (compile failure on netbsd)
2013-06-14 16:54:32 +02:00
Matteo Beccati
6238dd6f32 Fixed bug #63186 (compile failure on netbsd) 2013-06-14 16:51:54 +02:00
Stanislav Malyshev
02e4d7a290 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev
ac40c0b562 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:20:18 -07:00
Remi Collet
44dbe6a815 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  keep previous test to avoid any behavior change
2013-04-02 16:31:45 +02:00
Remi Collet
731a5c5104 keep previous test to avoid any behavior change 2013-04-02 16:31:36 +02:00
Remi Collet
ce89bc8743 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix comment
  Fixed Bug #64565 copy doesn't report failure on partial copy
2013-04-02 16:24:14 +02:00
Remi Collet
8e8a75444c fix comment 2013-04-02 16:24:00 +02:00
Remi Collet
6b4148bc97 Fixed Bug #64565 copy doesn't report failure on partial copy
_php_stream_copy_to_stream_ex, when mmap is possible, doesn't check
if actually written bytes match read bytes.

Fix this (paranoid check) to be consistent with non mmap mode

Seems hard to add a unit test, as this rely on a full filesystem.
2013-04-02 16:18:26 +02:00
Stanislav Malyshev
581db9c5fa Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix missing parameter
2013-01-27 17:11:36 -08:00
Andras Elso
3e6d633a0d Fix missing parameter 2013-01-27 17:11:14 -08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Rasmus Lerdorf
d5fe89670e Merge branch 'PHP-5.4' into PHP-5.5 2012-12-19 23:00:41 -05:00
Rasmus Lerdorf
180b9e150b Fix for bug #63811 2012-12-19 22:58:18 -05:00
Gustavo Lopes
f8e26d95f2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #63240 on stream_get_line()
2012-10-12 20:24:13 +02:00