| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mysqlnd currently sets error_reporting=0 to suppress errors while
writing to streams. Unfortunately these errors are still visible
to userland error handlers, which is a source of confusion.
See for example https://bugs.php.net/bug.php?id=80412.
Instead add a stream flag that suppresses the emission of
read/write errors in the first place, and set it in mysqlnd.
I think it might be useful to have this option for userland as
well in the future, but for now this is just an internal
mechanism.
Closes GH-6458.
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix #76735: Incorrect message in fopen on invalid mode
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #76735: Incorrect message in fopen on invalid mode
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have to log errors in `stream_opener` callbacks to the wrapper's
error log, because otherwise we may pick up an unrelated `errno` or a
most generic message.
Closes GH-6187.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79423: copy command is limited to size of file it can copy
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79423: copy command is limited to size of file it can copy
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Passing `NULL` as `lpFileSizeHigh` to `GetFileSize()` gives wrong
results for files larger than 0xFFFFFFFF bytes. We fix this by using
`GetFileSizeEx()`, and let the mapping fail, if the file size is too
large for the architecture.
Closes GH-5319.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix mmap copying
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of attempting to map large files into memory at once, we map
chunks of at most `PHP_STREAM_MMAP_MAX` bytes, and repeat that until we
hit the point where `php_stream_seek()` fails (see bug 54902), and copy
the rest of the file by reading and writing small chunks.
We also fix the mapping behavior for zero bytes on Windows, which did
not error (as with `mmap()`), but would have mapped the remaining file.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #80048: Bug #69100 has not been fixed for Windows
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #80048: Bug #69100 has not been fixed for Windows
|
| | |
| | |
| | |
| | |
| | |
| | | |
We fix the erroneous length calculation on Windows, too.
Closes GH-6067.
|
| | |
| | |
| | |
| | | |
Closes GH-5777.
|
| | |
| | |
| | |
| | | |
Closes GH-5590
|
| | | |
|
| | |
| | |
| | |
| | | |
Close GH-5675.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5076
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78883: fgets(STDIN) fails on Windows
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We add the `is_seekable` member to `php_stdio_stream_data`, and prefer
that over `is_pipe`, since the latter is simply a misnomer. We keep
`is_pipe` for now for Windows only, though, because we need special
support for pipes there. We also fix the misaligned bitfield which
formerly took 33 bit.
|
|/ /
| |
| |
| | |
Closes GH-4732.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are two related changes here:
1. Also check for S_ISCHR/FILE_TYPE_CHAR when checking for pipes, so
that we detect ttys as well, which are also not seekable.
2. Always set position=-1 (i.e. ftell will return false) when a pipe
is detected. Previously position=0 was sometimes used, depending on
whether we're on Windows/Linux and whether the FD or FILE codepath
was used.
|
| |
| |
| |
| | |
Similar to what is done for socket read/write errors.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.
As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).
I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
readdir_r() is deprecated in modern glibc versions. readdir() is
thread safe in practice, as long as there are no concurrent accesses
on the *same* directory stream.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix bug #77630 - safer rename() procedure
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix bug #77630 - safer rename() procedure
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.1:
Fix bug #77630 - safer rename() procedure
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In order to rename safer, we do the following:
- set umask to 077 (unfortunately, not TS, so excluding ZTS)
- chown() first, to set proper group before allowing group access
- chmod() after, even if chown() fails
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
|
|/ / / |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
|
| | | |
|
| | |
| | |
| | |
| | | |
where we sure about string persistence.
|
| | | |
|
| | |
| | |
| | |
| | | |
Keep non-constant "php_stream_wrapper"s in API functions and callbacks for compatibility.
|
|/ / |
|