1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

5365 Commits

Author SHA1 Message Date
Nikita Popov 32c20d5670 Remove unused mmap_file + mmap_len from basic_globals 2019-09-27 13:00:07 +02:00
Gabriel Caruso 5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov f10eb9f756 Merge branch 'PHP-7.4' 2019-09-11 10:32:27 +02:00
Nikita Popov 11f3e24190 Fixed bug #78506 2019-09-11 10:27:32 +02:00
Nikita Popov 790ed7d540 Enable display_startup_errors by default 2019-09-06 14:33:03 +02:00
Nikita Popov edf5896a4e Merge branch 'PHP-7.4' 2019-09-05 18:29:30 +02:00
Nikita Popov 9ec61e43d4 Fix pipe detection and stream position handling
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.
2019-09-05 18:29:15 +02:00
Nikita Popov 7f78f839dc php_stream_from_zval can no longer return false 2019-09-03 09:25:50 +02:00
Dmitry Stogov 78aa89a3ee Update PHP_API_VERSION 2019-09-02 19:02:40 +03:00
Nikita Popov ded9b987bb Merge branch 'PHP-7.4' 2019-08-30 16:08:05 +02:00
Nikita Popov 27da21d429 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-30 16:07:54 +02:00
Nikita Popov e9cfd94b8e Merge branch 'PHP-7.2' into PHP-7.3 2019-08-30 16:07:43 +02:00
Sergei Turchanov 8f564e5308 Fixed bug #78469
fcgi_accept_request function is supposed to call a FastCGI implementation's
on_accept hook when entering an "accepting" stage (that is right before
calling "accept"). This hook implementation (fpm_request_accepting) updates
a worker state to an "accepting" state which is effectively an "Idle" state,
and updates counters on the scoreboard of the corresponding pool (idle++,
active--).

But this is not done when listening for client connections on a named pipe on
Windows platform. In that case a combination of
ConnectNamedPipe/WaitForSingleObject is used (to be able to catch in_shutdown
as far as I understand), but it is nonetheless functionally equivalent to
"accept" call. Also by not calling on_hook neither a worker's state is updated
to "accepting" state nor scoreboard counters are updated.
2019-08-30 16:06:50 +02:00
Anatol Belski ad3c763e2c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix signature and calls
2019-08-27 14:35:06 +02:00
Anatol Belski 9b5d66bd52 Fix signature and calls 2019-08-27 14:34:35 +02:00
Stanislav Malyshev d3f2cfe20a Update Oniguruma to 6.9.1 2019-08-25 00:02:32 -07:00
Nikita Popov 51ea7fc477 Merge branch 'PHP-7.4' 2019-08-23 17:01:49 +02:00
Nikita Popov 724a4662b8 Replace strncat in filter implementation
In this case we already know exactly where we need to write, no
need to use strncat at all.
2019-08-23 16:18:50 +02:00
Benjamin Eberlei 58d661cd7d Cleanup unnecessary if guard clause to free buffer. 2019-08-18 12:28:40 +02:00
Sara Golemon 4b64d47c99 Bump for 7.2.23 2019-08-13 19:32:12 -04:00
Christoph M. Becker 5536105b67 Next will be 7.3.10 2019-08-13 23:57:48 +02:00
Christoph M. Becker fe7997912d Bump version numbers
This should have been done four weeks ago already.
2019-08-13 23:23:43 +02:00
Nikita Popov 2e4f76dc80 Merge branch 'PHP-7.4' 2019-08-13 10:23:32 +02:00
Nikita Popov b01824e596 Fixed bug #78406 2019-08-13 10:22:32 +02:00
Nikita Popov 1a9a5f995c Merge branch 'PHP-7.4' 2019-08-12 10:45:43 +02:00
Nikita Popov a18ad194c4 Fixed bug #78396 2019-08-12 10:45:13 +02:00
Nikita Popov d9e2d18505 Add some basic_functions stubs 2019-08-10 12:34:29 +02:00
Nikita Popov 148954101a Merge branch 'PHP-7.4' 2019-07-29 17:34:42 +02:00
Nikita Popov 536c91c535 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-29 17:34:37 +02:00
Nikita Popov 44fe025c28 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 17:34:16 +02:00
Albert Casademont dc7aa22b18 Fix bug #78326
Similar to what fread() does, truncate the stream_get_contents()
result if the original buffer was way too large.
2019-07-29 17:33:57 +02:00
Nikita Popov 9a3aef3c21 Merge branch 'PHP-7.4' 2019-07-29 17:15:35 +02:00
Nikita Popov 6df1665bb3 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-29 17:14:40 +02:00
Nikita Popov bbed5564eb Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 16:57:57 +02:00
Nikita Popov 38f1288b64 Fix Zend signals unblocking
There are a few parts here:
 * opcache should not be blocking signals while invoking compile_file,
   otherwise signals may remain blocked on a compile error. While at
   it, also protect SHM memory during compile_file.
 * We should deactivate Zend signals at the end of the request, to make
   sure that we gracefully recover from a missing unblock and signals
   don't remain blocked forever.
 * We don't use a critical section in deactivation, because it should
   not be necessary. Additionally we want to clean up the signal queue,
   if it is non-empty.
 * Enable SIGG(check) in debug builds so we notice issues in the future.
2019-07-29 15:17:32 +02:00
Nikita Popov 8d39510af8 Merge branch 'PHP-7.4' 2019-07-25 10:43:50 +02:00
Nikita Popov 1cbcf0f4f1 Throw notice for plain wrapper fread/fwrite errors
Similar to what is done for socket read/write errors.
2019-07-25 10:42:10 +02:00
Nikita Popov a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov d59aac58b3 Report errors from stream read and write operations
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.
2019-07-22 17:17:28 +02:00
Nikita Popov 36db71df47 Merge branch 'PHP-7.4' 2019-07-22 12:28:40 +02:00
Nikita Popov b3f74b0b7d Deprecate allow_url_include 2019-07-22 11:39:52 +02:00
Nikita Popov 96aae524bf Merge branch 'PHP-7.4' 2019-07-17 15:59:31 +02:00
Nikita Popov 56a2ea7aa2 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-17 15:59:22 +02:00
Nikita Popov 79efd55fc3 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-17 15:59:14 +02:00
Nikita Popov b864abfe23 Fixed bug #69100 2019-07-17 15:58:29 +02:00
Nikita Popov 07a4d134ab 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.
2019-07-17 14:48:51 +02:00
Nikita Popov 1221293a98 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.
2019-07-17 14:48:10 +02:00
Nikita Popov 3c2f433b2b Merge branch 'PHP-7.4' 2019-07-17 12:02:30 +02:00
Nikita Popov 856c5d2837 Revert "Avoid unused fstat() call"
This reverts commit 5a90dc77b8.

Let's try to go with the reverse direction here and actually trust
the reported size...
2019-07-17 11:49:10 +02:00
Nikita Popov 995b391621 Merge branch 'PHP-7.4' 2019-07-17 11:22:41 +02:00