Commit Graph

643 Commits

Author SHA1 Message Date
Nikita Popov
9e1b690e0c Merge branch 'PHP-5.4'
* PHP-5.4:
  Add NEWS entry for bug #61961
  Fixed Bug #61961 (file_get_content leaks when access empty file with max length)
2012-05-06 13:40:06 +02:00
Nikita Popov
bef6111609 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Add NEWS entry for bug #61961
  Fixed Bug #61961 (file_get_content leaks when access empty file with max length)
2012-05-06 13:33:47 +02:00
Reeze Xia
3e9923dd8d Fixed Bug #61961 (file_get_content leaks when access empty file with max length) 2012-05-06 18:27:26 +08:00
Gustavo André dos Santos Lopes
bd5f52fd94 Merge branch '5.4' 2012-04-07 16:34:37 +01:00
Gustavo André dos Santos Lopes
f7d4076785 Merge branch '5.3' into 5.4 2012-04-07 16:34:17 +01:00
Gustavo André dos Santos Lopes
0f180a63eb Fixed bug in new stream_get_line() when using NUL as a delimiter.
This is the issue Derick spotted a few days ago..
2012-04-07 16:32:19 +01:00
Gustavo André dos Santos Lopes
9a460497da MFH: 45a6f8d for 5.4.
- Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected
  together with the last read).
- Fixed bug #60817 (stream_get_line() reads from stream even when there is
  already sufficient data buffered). stream_get_line() now behaves more like
  fgets(), as is documented.
2012-03-19 16:34:31 +00:00
Gustavo André dos Santos Lopes
e132db7a57 - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in
  fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition
  for deleting the context was too broad) and so prevents segfaults in new
  circumstances (where the inhibition was not broad enough).
2012-03-17 19:37:30 +00:00
Gustavo André dos Santos Lopes
d974e44248 - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in
  fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition
  for deleting the context was too broad) and so prevents segfaults in new
  circumstances (where the inhibition was not broad enough).
2012-03-17 19:37:30 +00:00
Gustavo André dos Santos Lopes
ef19fba2d5 - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in
  fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition
  for deleting the context was too broad) and so prevents segfaults in new
  circumstances (where the inhibition was not broad enough).
2012-03-17 19:37:30 +00:00
Gustavo André dos Santos Lopes
cdc512afb3 - Oops committed old version of the patch in r324020. Fixed. See bug #61253. 2012-03-08 12:39:48 +00:00
Gustavo André dos Santos Lopes
aee85bc163 - Oops committed old version of the patch in r324020. Fixed. See bug #61253. 2012-03-08 12:39:48 +00:00
Gustavo André dos Santos Lopes
b976ebad35 - Oops committed old version of the patch in r324020. Fixed. See bug #61253. 2012-03-08 12:39:48 +00:00
Gustavo André dos Santos Lopes
0169020e49 - Fixed bug #61253: Wrappers opened with errors concurrency problem
#NOTE: There is a very small possibility that this will further break
#extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the
#only one and it may leak memory after this. I say "further break" because
#extensions that do that are already broken (will segfault) under ZTS, which is
#why this patch is necessary.
#There was what I deem as tacit acceptance from 5.3/5.4 RMs on this.
2012-03-08 12:30:59 +00:00
Gustavo André dos Santos Lopes
7166298d63 - Fixed bug #61253: Wrappers opened with errors concurrency problem
#NOTE: There is a very small possibility that this will further break
#extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the
#only one and it may leak memory after this. I say "further break" because
#extensions that do that are already broken (will segfault) under ZTS, which is
#why this patch is necessary.
#There was what I deem as tacit acceptance from 5.3/5.4 RMs on this.
2012-03-08 12:30:59 +00:00
Gustavo André dos Santos Lopes
f413b3726c - Fixed bug #61253: Wrappers opened with errors concurrency problem
#NOTE: There is a very small possibility that this will further break
#extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the
#only one and it may leak memory after this. I say "further break" because
#extensions that do that are already broken (will segfault) under ZTS, which is
#why this patch is necessary.
#There was what I deem as tacit acceptance from 5.3/5.4 RMs on this.
2012-03-08 12:30:59 +00:00
Gustavo André dos Santos Lopes
02592974b4 - size_t may be shorter than long and definitely is not signed. Note that the
z modifier was only added in C99, so we can't use it.
2012-03-04 19:30:01 +00:00
Gustavo André dos Santos Lopes
3e6bc8fbce - size_t may be shorter than long and definitely is not signed. Note that the
z modifier was only added in C99, so we can't use it.
2012-03-04 19:30:01 +00:00
Gustavo André dos Santos Lopes
32c5643f6b - size_t may be shorter than long and definitely is not signed. Note that the
z modifier was only added in C99, so we can't use it.
2012-03-04 19:30:01 +00:00
Ilia Alshanetsky
0fe734b7c8 Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) 2012-03-03 20:36:14 +00:00
Ilia Alshanetsky
5525d80982 Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) 2012-03-03 20:36:14 +00:00
Ilia Alshanetsky
67db5de6b2 Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) 2012-03-03 20:36:14 +00:00
Gustavo André dos Santos Lopes
bcefc31e68 - Better fix for #61115.
- Fixed resource leak in stream_socket_client().
2012-02-24 22:56:21 +00:00
Gustavo André dos Santos Lopes
911330e62c - Better fix for #61115.
- Fixed resource leak in stream_socket_client().
2012-02-24 22:56:21 +00:00
Gustavo André dos Santos Lopes
cde7662226 - Fixed bug #61115 (stream related segfault on fatal error in
php_stream_context_link).
#run-tests.php is not currently detecting the segfault in the test
#Missing 5.4 merge
2012-02-22 11:45:26 +00:00
Gustavo André dos Santos Lopes
eb1ada852d - Fixed bug #61115 (stream related segfault on fatal error in
php_stream_context_link).
#run-tests.php is not currently detecting the segfault in the test
#Missing 5.4 merge
2012-02-22 11:45:26 +00:00
Gustavo André dos Santos Lopes
fc134965c8 - Revert r134029. The streams pooling API was never used in more
than 8 years and therefore unnecessarily adds complexity.
2012-02-21 21:55:00 +00:00
Mateusz Kocielski
ddcf55b640 * fixed bug #60704 unlink() bug with some files path
Reviewed by: rasmus@
2012-02-14 14:14:30 +00:00
Mateusz Kocielski
4d600bda70 * fixed bug #60704 unlink() bug with some files path
Reviewed by: rasmus@
2012-02-14 14:14:30 +00:00
Gustavo André dos Santos Lopes
45a6f8d9a5 - Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected
together with the last read).
- Fixed bug #60817 (stream_get_line() reads from stream even when there is
  already sufficient data buffered). stream_get_line() now behaves more like
  fgets(), as is documented.
#withheld commit to 5.4
2012-01-22 20:30:37 +00:00
Gustavo André dos Santos Lopes
f5a4573182 - Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected
together with the last read).
- Fixed bug #60817 (stream_get_line() reads from stream even when there is
  already sufficient data buffered). stream_get_line() now behaves more like
  fgets(), as is documented.
#withheld commit to 5.4
2012-01-22 20:30:37 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov
ce52784052 Initialize structure (some fields may be missed in array returned from user handler). 2011-12-22 15:33:48 +00:00
Dmitry Stogov
0e563dfa93 Initialize structure (some fields may be missed in array returned from user handler). 2011-12-22 15:33:48 +00:00
Dmitry Stogov
3f5f5eefe5 Initialize structure (some fields may be missed in array returned from user handler). 2011-12-22 15:33:48 +00:00
Gustavo André dos Santos Lopes
74d2b2f0bd - Fixed bug #60455: stream_get_line misbehaves if EOF is not detected together
with the last read.
2011-12-11 21:08:15 +00:00
Gustavo André dos Santos Lopes
faec3c5111 - Fixed bug #60455: stream_get_line misbehaves if EOF is not detected together
with the last read.
2011-12-11 21:08:15 +00:00
Gustavo André dos Santos Lopes
52c36e60c4 - Fixed bug #60455: stream_get_line misbehaves if EOF is not detected together
with the last read.
2011-12-11 21:08:15 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Dmitry Stogov
e43ff1359e Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Gustavo André dos Santos Lopes
08f78070a5 - Fixed borked refactoring in r307437 (using SUCCESS/FAILURE return instead of
out parameter).
- Fixed signature of php_stream_copy_to_stream_ex to return int in 5.4/trunk
  instead of size_t, as the function only returns SUCCESS/FAILURE.
2011-09-04 22:36:33 +00:00
Gustavo André dos Santos Lopes
2acbe4c93e - Fixed borked refactoring in r307437 (using SUCCESS/FAILURE return instead of
out parameter).
- Fixed signature of php_stream_copy_to_stream_ex to return int in 5.4/trunk
  instead of size_t, as the function only returns SUCCESS/FAILURE.
2011-09-04 22:36:33 +00:00
Gustavo André dos Santos Lopes
d5c5bb0e96 - Fixed borked refactoring in r307437 (using SUCCESS/FAILURE return instead of
out parameter).
- Fixed signature of php_stream_copy_to_stream_ex to return int in 5.4/trunk
  instead of size_t, as the function only returns SUCCESS/FAILURE.
2011-09-04 22:36:33 +00:00
Xinchen Hui
9fb62f3382 Sync r314808 to 5_3 branch
Eliminated compiler warnings "comparison is always false",  "cast to pointer from integer of different siz" and tail zero warnings
2011-08-23 10:18:48 +00:00
Xinchen Hui
fa1883de19 Omitted GCC warning "comparison is always false" 2011-08-12 07:47:03 +00:00
Xinchen Hui
ba9546b8e5 Omitted GCC warning "comparison is always false" 2011-08-12 07:47:03 +00:00
Xinchen Hui
64fc565765 Avoiding strcpy, strcat, sprintf usage to make static analyzer happy 2011-08-09 12:16:58 +00:00
Xinchen Hui
5dc3195897 Avoiding strcpy, strcat, sprintf usage to make static analyzer happy 2011-08-09 12:16:58 +00:00
Xinchen Hui
0630945ac4 Avoiding strcpy, strcat, sprintf usage to make static analyzer happy 2011-08-09 12:16:58 +00:00
Stanislav Malyshev
fa78f7a4c0 retore open_basedir check for unlink 2011-07-31 22:43:21 +00:00
Stanislav Malyshev
2f1752cb49 retore open_basedir check for unlink 2011-07-31 22:43:21 +00:00
Pierre Joye
fc8afdf178 - Fixed bug 55124, recursive mkdir fails with current (dot) directory in path 2011-07-26 17:44:20 +00:00
Pierre Joye
db25201ffb - Fixed bug 55124, recursive mkdir fails with current (dot) directory in path 2011-07-26 17:44:20 +00:00
Gustavo André dos Santos Lopes
987c843674 - Fixed bug #52935 (call exit in user_error_handler cause stream relate core). 2011-07-05 16:09:06 +00:00
Gustavo André dos Santos Lopes
9898f9070f - Fixed bug #52935 (call exit in user_error_handler cause stream relate core). 2011-07-05 16:09:06 +00:00
Gustavo André dos Santos Lopes
afe4570cda - Fixed bug #52935 (call exit in user_error_handler cause stream relate core). 2011-07-05 16:09:06 +00:00
Ilia Alshanetsky
a311dc2443 Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). 2011-06-05 21:57:01 +00:00
Ilia Alshanetsky
6b85eb58b2 Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). 2011-06-05 21:57:01 +00:00
Ilia Alshanetsky
d846d0e80a Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). 2011-06-05 21:57:01 +00:00
Hannes Magnusson
9392b9cd73 Fixed bug #54946 (stream_get_contents infinite loop) 2011-05-29 12:29:19 +00:00
Hannes Magnusson
3b030ec75f Fixed bug #54946 (stream_get_contents infinite loop) 2011-05-29 12:29:19 +00:00
Hannes Magnusson
73c1488fec Fixed bug #54946 (stream_get_contents infinite loop) 2011-05-29 12:29:19 +00:00
Stanislav Malyshev
f9088156f4 implement streams metadata API per RFC 2011-05-25 21:03:55 +00:00
Stanislav Malyshev
5c9080d3a6 implement streams metadata API per RFC 2011-05-25 21:03:55 +00:00
Gustavo André dos Santos Lopes
8f77168384 - Merged to 5.3 change in trunk in _php_stream_free. This prevents the segfault
in the testcase for bug #53624. The testcase still has to be fixed though,
  because it only works as intended on Windows.
2011-05-08 19:59:42 +00:00
Gustavo André dos Santos Lopes
02302812e1 - Fixed accidental change. 2011-05-01 04:16:28 +00:00
Gustavo André dos Santos Lopes
8dfe15a12e - Fixed accidental change. 2011-05-01 04:16:28 +00:00
Gustavo André dos Santos Lopes
6df67ace20 - Fixed bug #54623 (Segfault when when writing to a persistent socket after
closing a copy of the socket).
2011-05-01 03:57:01 +00:00
Gustavo André dos Santos Lopes
93f65cdeac - Fixed bug #54623 (Segfault when when writing to a persistent socket after
closing a copy of the socket).
2011-05-01 03:57:01 +00:00
Pierrick Charron
1368364469 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Pierrick Charron
e8486cc374 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Gustavo André dos Santos Lopes
7f2937223d - Make fclose() actually close stream, even when the resource refcount is > 1.
This reverts the fix for bug #24557.
- Make php_stream_free delete the stream from the resources list, not merely
  decrease its refcount, as a single call to zend_list_delete does.           
#Not worth the risk merging to 5.3. While change #2 may prevent some segfaults,
#a quick and dirty survey to the codebase only showed calls to php_stream_close
#or php_stream_free on streams allocated in the same function, which would have
#refcount == 1. May be reconsidered.
2011-03-21 02:58:54 +00:00
Gustavo André dos Santos Lopes
a3a5157286 - PHP_STREAM_OPTION_WRITE_BUFFER no longer disables the read buffer of a plain
stream when 0 is given as the value.
- PHP_STREAM_OPTION_WRITE_BUFFER no longer changes the chunk size in socket
  streams.
- Added stream_set_chunk_size() function.
- Some signedness fixes.
- Test for commit r308474, now that it's possible to actually test it.
2011-02-19 01:28:37 +00:00
Gustavo André dos Santos Lopes
3759331276 - Changed return value in userspace stream set_option to "not implemented",
instead of failure.
#Currently, there's no way to test this, because the only operations that have
#a default implementation, set_chunk_size and set_read_buffer are either not
#exposed or, in the 2nd case, completely delegated to the user implementation,
#which can only return true/false, not "not implemented" (and not implementing
#the set_option method in the userspace stream results in error).
2011-02-18 17:53:26 +00:00
Gustavo André dos Santos Lopes
9bbc114b59 - Classes that implement stream wrappers can define a method called
stream_truncate that will respond to truncation, e.g. through ftruncate.
  Closes feature request #53888.
2011-02-17 00:25:32 +00:00
Adam Harvey
2b4fb94e8e Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
2011-02-04 10:47:41 +00:00
Adam Harvey
521e5462ab Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
2011-02-04 10:47:41 +00:00
Gustavo André dos Santos Lopes
36d82e8a85 - Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
2011-02-01 22:55:17 +00:00
Gustavo André dos Santos Lopes
1f49902999 - Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
2011-02-01 22:55:17 +00:00
Gustavo André dos Santos Lopes
c6ccc43285 - Fixed several comparisons that always result in true of false
due to signedness of one of the operands, either by removing
  dead code or fixing it.
- Thrown some comments around in php_stream_get_record.
- See http://www.mail-archive.com/internals@lists.php.net/msg49525.html
2011-02-01 18:11:16 +00:00
Gustavo André dos Santos Lopes
da0e2a416f - Fixed several comparisons that always result in true of false
due to signedness of one of the operands, either by removing
  dead code or fixing it.
- Thrown some comments around in php_stream_get_record.
- See http://www.mail-archive.com/internals@lists.php.net/msg49525.html
2011-02-01 18:10:35 +00:00
Pierre Joye
af9406de8e - don't continue if no valid option value 2011-01-20 07:38:00 +00:00
Pierre Joye
657c934513 - don't continue if no valid option value 2011-01-20 07:38:00 +00:00
Pierre Joye
7f3100976f - no need of assert here 2011-01-20 06:32:59 +00:00
Pierre Joye
966a82c776 - no need of assert here 2011-01-20 06:32:59 +00:00
Ilia Alshanetsky
93fd1bf53f Fixed variable re-declaration 2011-01-13 12:56:28 +00:00
Ilia Alshanetsky
c33795b25b Fixed variable re-declaration 2011-01-13 12:56:28 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Gustavo André dos Santos Lopes
5a1b77422a - Reverted unintended change. 2010-11-19 23:42:44 +00:00
Gustavo André dos Santos Lopes
1045aa2a7c - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream).
2010-11-15 18:22:52 +00:00
Gustavo André dos Santos Lopes
e10454ded8 - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream).
2010-11-15 18:22:52 +00:00
Gustavo André dos Santos Lopes
3a02cfb675 - Added leak_variable() function.
- Added mechanism to force outer streams to be closed before their inner ones.
- Fixed temp:// streams only handling correctly (through an ad hoc mechanism)  reverse closing order
  when the  inner stream is of type memory.
2010-11-15 03:05:32 +00:00
Gustavo André dos Santos Lopes
8342c36f09 - Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
  exported and movied it from php_streams.h to
  php_streams_int.h.
2010-11-05 18:53:48 +00:00
Gustavo André dos Santos Lopes
d37e1ea243 - Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
  exported and movied it from php_streams.h to
  php_streams_int.h.
2010-11-05 18:53:48 +00:00
Gustavo André dos Santos Lopes
68107ae1c3 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00
Gustavo André dos Santos Lopes
0a35133524 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00
Gustavo André dos Santos Lopes
14a54b903e - Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
  and when there was data in the buffer before the emulation started. Also made
  more consistent its behavior -- should return failure every time less data
  than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
  invalid call to the seek handler or read handler. in _php_stream_seek.
2010-10-13 03:13:29 +00:00
Gustavo André dos Santos Lopes
a1888f585c - Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
  and when there was data in the buffer before the emulation started. Also made
  more consistent its behavior -- should return failure every time less data
  than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
  invalid call to the seek handler or read handler. in _php_stream_seek.
2010-10-13 03:13:29 +00:00
Pierre Joye
ed58636f00 - use TSRMLS_D/C with php_stream_context_alloc 2010-09-16 09:33:42 +00:00
Pierre Joye
daa90813fb - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert, missing header 2010-09-16 09:18:46 +00:00
Pierre Joye
aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Felipe Pena
feda017cce - Fixed bug #49215 (make fails on glob_wrapper) 2010-09-10 21:33:50 +00:00
Felipe Pena
6ca2ea7109 - Fixed bug #49215 (make fails on glob_wrapper) 2010-09-10 21:33:50 +00:00
Pierre Joye
13fd8fcded - WS 2010-09-01 10:16:48 +00:00
Pierre Joye
ada5423308 - WS 2010-09-01 10:16:48 +00:00
Pierre Joye
87bf415853 - sb needed only in safemode 2010-09-01 10:13:46 +00:00
Pierre Joye
6396a3272c - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Pierre Joye
dec8593fac - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Kalle Sommer Nielsen
159cd6916d Fixed compiler warnings in main/ 2010-08-17 12:49:19 +00:00
Pierre Joye
0d47dff287 - #51854, fix logic (patch by Tjerk) 2010-05-18 19:39:39 +00:00
Pierre Joye
3a19fee38b - #51854, fix logic (patch by Tjerk) 2010-05-18 19:39:39 +00:00
Kalle Sommer Nielsen
dd8e59da8f Removed safe_mode
* Removed ini options, safe_mode*
 * Removed --enable-safe-mode --with-exec-dir configure options on Unix
 * Updated extensions, SAPI's and core
 * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Antony Dovgal
d2699793e0 fix build 2010-04-08 09:56:18 +00:00
Pierre Joye
c264445a37 - WS 2010-04-08 07:55:35 +00:00
Pierre Joye
517d9bb1f2 - WS 2010-04-08 07:55:35 +00:00
Michael Wallner
5b277c4da0 add backlock socket context option for stream_socket_server(),
which had a hardcoded backlog of 5 at two occurrances
2010-03-11 16:37:24 +00:00
Pierre Joye
acc6609a27 - get the right error on windows 2010-02-21 17:44:25 +00:00
Pierre Joye
658e86b847 - prevent unexpectable behaviors (for the user) with invalid path 2010-02-07 20:15:58 +00:00
Pierre Joye
b7aee13069 - removed debug breakpoint and improve inline comment 2010-01-27 02:03:41 +00:00
Pierre Joye
6925763347 - prevent bad things to happen when invalid path are passed to MoveFileEx 2010-01-27 01:18:43 +00:00
Pierre Joye
573c33b3b7 - [DOC] #45986, bad file descriptor warning when rename is used with invalid path, add php_win32_docref2_from_error to display system error for non posix api 2010-01-26 20:04:03 +00:00
Jani Taskinen
3d733ce6fa - Fixed bug #50791 (Compile failure: Bad logic in defining fopencookie emulation) 2010-01-19 13:44:08 +00:00
Jani Taskinen
95a4f5fabe - WS + CS fixes 2010-01-19 12:03:07 +00:00
Ilia Alshanetsky
7e1f29e930 Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). 2010-01-18 12:50:08 +00:00
Ilia Alshanetsky
d5b2007bed Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but returns false). 2010-01-06 12:54:53 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Antony Dovgal
42d05a5c02 remove automatic file unlocking on shutdown and/or stream close
(make it win32-specific for 5_2, as discussed with Ilia)
2009-12-25 20:34:59 +00:00
Stanislav Malyshev
0401c6ca2d fix bug #50196 2009-12-19 01:13:33 +00:00
Kalle Sommer Nielsen
1063c8346b MFT: VC10 build support 2009-12-03 11:50:32 +00:00
Felipe Pena
f61a06350a - Switching to TSRMLS_FETCH version 2009-11-16 10:36:27 +00:00
Felipe Pena
5411bb32a8 - Fixed bug #49936 (crash with ftp stream in php_stream_context_get_option())
(patch by Pierrick)
2009-11-15 20:30:57 +00:00
Johannes Schlüter
473d75475a Fix #50063 (safe_mode_include_dir fails) 2009-11-12 15:05:03 +00:00
Dmitry Stogov
4b1c7c5615 Fixed ext/standard/tests/streams/stream_get_contents_002.phpt 2009-09-23 10:25:54 +00:00
Sriram Natarajan
fbc335e5d1 - Fixed bug #49572 (use of C++ style comments causes build failure) 2009-09-17 02:45:25 +00:00
Sriram Natarajan
ac2d3990f2 - Fixed bug #49447 (php engine need to correctly check for socket API
return status on windows). (Sriram Natarajan)
2009-09-04 07:59:48 +00:00
Arnaud Le Blanc
c79528a26d MFH: Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not
update stream position of plain files)
2009-05-17 14:58:10 +00:00
Arnaud Le Blanc
fab1f0e754 Fix warning when inner stream of a temp:// stream is closed before
the stream ifself
2009-05-16 20:27:36 +00:00
Arnaud Le Blanc
a2600facdd MFH: Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source
is a socket)
2009-05-16 20:23:06 +00:00
Hannes Magnusson
ebf7a8e9a3 Fix comments 2009-05-08 11:35:12 +00:00
Pierre Joye
be093af4fa - silent compiler warning 2009-04-20 08:28:44 +00:00
Arnaud Le Blanc
8ea9eb8560 MFH: Better fix for #47997 2009-04-19 17:10:35 +00:00
Arnaud Le Blanc
14c717f449 Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams) 2009-04-19 13:46:47 +00:00
Mikko Koppanen
3fd12260aa MFH: Added support for passing O_NONBLOCK to the underlying open() system call 2009-04-11 11:44:15 +00:00
Hannes Magnusson
2881a60e31 Add missing proto 2009-03-25 19:55:59 +00:00
Arnaud Le Blanc
2b57d6d6ea MFH: Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer()
performance degraded after fix of bug 44607).
2009-03-19 17:55:10 +00:00
Ilia Alshanetsky
aaa5361c90 Adjust condition 2009-02-10 16:14:18 +00:00
Ilia Alshanetsky
2b531b5149 MFB: typo fix 2009-02-10 14:21:27 +00:00
Ilia Alshanetsky
986a933c82 MFB: Added path truncation E_NOTICE to let people now when path resolving
caused the file path to be truncated.
2009-02-10 14:18:46 +00:00
Ilia Alshanetsky
311a87c8d7 MFB: Fixed bug #44874 (dead pfsockopen'ed sockets aren't reaped when
the remote end restarts)
2009-02-09 02:55:45 +00:00
Pierre Joye
acdb832581 - silent compiler warning about socklen_t benign redefinition 2009-02-02 09:41:46 +00:00
Felipe Pena
31169e2c1a MFH:
- Fixed bug #47037 (No error when using fopen with emty string)
Patch by Cristian Rodriguez R.
2009-01-08 18:46:00 +00:00
Arnaud Le Blanc
61ae60f805 MFH: Fixed error conditions handling in stream_filter_append() 2009-01-08 17:01:58 +00:00
Felipe Pena
7c989115c2 MFH:
- Added check for EWOULDBLOCK
- Using EWOULDBLOCK instead of EAGAIN by portability issues
(Related to #46917)
2009-01-07 20:21:46 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Lars Strojny
29f49d2ded If a wrapper could not be found it is either a typo or a configuration issue. But in both cases it is critical enough to warn the user. 2008-12-14 16:25:37 +00:00
Dmitry Stogov
7d4fd3fd38 Fixed bug #46409 (__invoke method called outside of object context when using array_map) 2008-11-27 19:01:23 +00:00
Arnaud Le Blanc
dffdb48c3b MFH: Fixed bug #46673 (stream_lock call with wrong paramater) 2008-11-26 04:19:20 +00:00
David Soria Parra
a9282f72a8 MFH: Revert fix for 43782, as it caused problems. 2008-11-24 15:36:47 +00:00
Arnaud Le Blanc
c6e1b8bc67 MFH: Added stream_cast() and stream_set_options() to user-space stream
wrappers, allowing stream_select(), stream_set_blocking(),
stream_set_timeout() and stream_set_write_buffer() to work with user-space
stream wrappers.
Will document.
2008-11-15 12:52:13 +00:00
Arnaud Le Blanc
e13a4238e5 MFH: Fixed stream_get_contents() when using $maxlength and socket is not
closed. indeyets@php.net on #46049.
2008-11-11 01:55:51 +00:00
Arnaud Le Blanc
d441b5db5b MFH: Fixed stream_get_line() to behave as documented on non-blocking
streams
2008-11-04 17:05:55 +00:00
Arnaud Le Blanc
8e220d99df MFH: Fixed bug #44607 (stream_get_line unable to correctly identify the
"ending" in the stream content)
2008-11-03 23:29:17 +00:00
Arnaud Le Blanc
de29f4161f MFH: Fixed bug #45303 (Opening php:// wrapper in append mode results
in a warning)
2008-11-03 16:58:53 +00:00
Arnaud Le Blanc
0a2bfc7968 MFH: Fixed bug #43353 (wrong detection of 'data' wrapper causes notice) 2008-11-03 15:47:31 +00:00
Nuno Lopes
8a77e55566 clean some dead code (with static analysis help) 2008-09-23 15:18:26 +00:00
Greg Beaver
17cfd5f24e MF52 fix Bug #46147: after stream seek, appending stream filter reads incorrect data 2008-09-22 01:26:14 +00:00
David Soria Parra
9f68483734 MFH: Fixed bug #43782 (feof() does not detect timeout on socket) 2008-08-26 16:06:36 +00:00
Arnaud Le Blanc
c93fbf629b MFH:
Added clear_realpath_cache and filename parameters to clearstatcache() (Jani,
Arnaud)
[DOC] clearstatcache() now defaults to not affect the realpath cache.
clearstatcache() now takes two optionnal parameters, clear_realpath_cache to
clear the realpath cache (defaults to false), and filename to clear only the
given filename from the cache.
2008-08-07 09:25:33 +00:00
Antony Dovgal
93908474ad MFH: increase context refcount before open() to avoid crash when open() fails and destroys the context 2008-08-06 09:03:48 +00:00
Dmitry Stogov
691d4a6999 Fixed uninitialised data 2008-07-25 08:23:07 +00:00
Jani Taskinen
d91bc9eca2 MFH:- Fixed bug #44127 (UNIX abstract namespace socket connect does not work) 2008-07-16 14:08:38 +00:00
Antony Dovgal
04c8373b6a MFH 2008-07-11 12:44:02 +00:00
Antony Dovgal
cf7e15c3a0 MFH: manage references of stream context properly 2008-07-11 10:25:15 +00:00
Dmitry Stogov
99933df5e2 closeder/readdir/rewinddir must work only with directories 2008-06-11 09:01:56 +00:00
Greg Beaver
cac1fd72ea fix erroneous use of php_resolve_path in _php_stream_wrapper_open_ex - this breaks require/include for all extensions that intercept zend_resolve_path 2008-04-28 22:39:54 +00:00
Greg Beaver
c46d651b3e Fixed potentially confusing error message on failure when no errors are logged 2008-04-28 22:37:31 +00:00
Greg Beaver
e668dc629b do not scan include_path with faulty plain_wrapper-based include_path fopen
# _fopen_with_path_rel probably needs to call out to regular php_stream_open, for exts that use it (it is exported)
2008-04-13 22:19:10 +00:00
Dmitry Stogov
862f9ee3d2 Added ability to use stream wrappers in include_path 2008-03-27 10:33:40 +00:00
Antony Dovgal
fc134fd6c5 MFH: disabled mmap() when copying files to memory 2008-03-24 16:28:35 +00:00
Marcus Boerger
f8f01a1fd1 - MFH Settle to 4 MB, see internals@ archives 2008-03-21 19:37:43 +00:00
Marcus Boerger
3ce7194a4d - MFH Fix comment 2008-03-21 18:21:09 +00:00
Marcus Boerger
9f001a01a1 - MFH Increase max mmap size to 8 MB 2008-03-21 17:13:08 +00:00
Felipe Pena
bbac59aa40 MFB: Fixed bug #44440 (st_blocks undefined under BeOS) 2008-03-15 10:32:32 +00:00
Andrey Hristov
49add03404 char **error_message was passed but not used. This causes problems in cases
of getaddrinfo() failure, because the upper layers don't get the error.
initialize a variable because we were reading initialized in case of error.
2008-03-10 19:54:47 +00:00
Ilia Alshanetsky
425c4bca2e Fixed bug #44233 (MSG_PEEK undefined under BeOS R5) 2008-02-27 00:30:24 +00:00
Marcus Boerger
81b40f7047 - MFH Get rid of overoptimization 2008-01-30 23:43:13 +00:00
Greg Beaver
7c1952c863 MFH: clarify error message on why opening a stream wrapper failed for allow_url_include/allow_url_fopen, add test for allow_url_fopen 2008-01-12 15:50:57 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Antony Dovgal
2dab3c40fe correct fix for bug #43522 2007-12-29 10:52:24 +00:00
Ilia Alshanetsky
b9e4413962 Fixed bug #43522 (stream_get_line() eats additional characters) 2007-12-10 14:16:58 +00:00
Jani Taskinen
dcd3b197e7 MFH:- Fixed bug #43365 (Several enums have trailing commas) 2007-11-26 10:59:04 +00:00
Ilia Alshanetsky
6a792bed75 Fixed bug #43182 (file_put_contents() LOCK_EX does not work properly on file
truncation).
2007-11-12 18:44:18 +00:00
Marcus Boerger
5aa7108eb2 - MFH Add glob stream wrapper
[DOC] The glob stream wrapper allows stuff like this:
php -r '$it = new DirectoryIterator("glob://ext/spl/*.c");
        foreach($it as $f) var_dump($f);'
2007-11-06 12:12:58 +00:00
Marcus Boerger
fb7306822d - MFH glob stream wrapper (part 1) 2007-11-06 11:50:52 +00:00
Marcus Boerger
6362476b20 MFH streams stuff 2007-11-06 11:02:36 +00:00
Jani Taskinen
34b45a30e5 MFH: nuke unused variables 2007-11-01 17:32:44 +00:00
Jani Taskinen
f552f91618 MFH: - Fixed bug #43137 (rmdir() and rename() do not clear statcache) 2007-10-31 13:22:45 +00:00