- new error format that does not point to any documentation (if either
not html_errors or no docref_root given e.g.: production boxes and default)
- documentation update in php.ini-<xxx>
# hope everyone is happy now
# and why on earth was enabling html_errors default?
. stream_socket_client() - similar to fsockopen(), but more powerful.
. stream_socket_server() - Creates a server socket.
. stream_socket_accept() - Accept a client connection.
. stream_socket_get_name() - Get local or remote name of socket.
Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
(currently only supports OpenSSL, but could support other SSL toolkits,
and other crypto transport protocols).
Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
removing the link-time requirement for ssl:// and https:// sockets and
streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
there are now a range of possible socket-type streams.
Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.
# I will be updating the win32 build to add the new files shortly
# after this commit.
the sendmail deamon on a per-vhost base. The value in this ini setting
will override all extra commands passed as the 5th parameter to mail()
and will work in Safe Mode.
@- Added an extra ini setting (mail_force_extra_paramaters) which forces
@ the addition of the specified parameters to be passed as extra
@ parameters to the sendmail binary. These parameters will always replace
@ the value of the 5th parameter to mail(), even in safe mode. (Derick)
into entities or use some other mechanism which causes the filtered data
to be longer than the original data. Ergo, pass in the address of the
buffer instead so the filter is free to reallocate it.
This breaks user-space filters (for the time being), and those
weird convert.* filters in ext/standard/filters.c
The filters stack has been separated into one chain for read and one chain
for write.
The user-space stream_filter_append() type functions currently only operate
on the read chain. They need extending to work with the write chain too.
windows sockets. The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.
This change required linking against the winsock2 library. In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default. It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.
Also, add a win32 compatible pipe test when opening a stream from a pipe. This test will only work on NT, win2k and XP platforms. Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered. I will be working on a fix for this issue for win9x.
- introduces an overflow detection in STR_TO_DEC
- eliminates dead code (e.g. assert(foo); if (foo) {..})
- removes unused macros from the original code
- simplifies code (e.g. cc was completely dropped)
- improves run-time performance
The max_len feature is never used in our code base.
Nevertheless, cpu cycles were spent on each string
operation to check the current length against max_len which
is quite inefficient. Thus, I've moved the check to
vspprintf where it is applied only once per call.
Sometimes streams signal a temporary EOF, because all current data
has been consumed. But that does not preclude the possibility that
more data will become available later.
Thus we must not treat eof in the read path as final.
Now, "tail -f" like scripts work again.
alphabetical order. This gives a user a way to control the order in which
the ini files are loaded).
Fixed a bug that would make the code try to read files without an extension
as ini files.
non-privileged user the web server is running as. this is useful
for creating shared memory segments which need to be accessed by
the child processes/threads.
the stream position was at offset 0.
This corrects that assumption by querying the stream for it's position
when it detects the 'a' "flag" in the mode parameter to fopen.
Also added a test for plain files and amended the userstreams test to
take this into account.
Analysis:
On systems with HAVE_GETADDRINFO and IPV6 support, php_hostconnect would
attempt to connect to each possible address that matched the requested IP.
If the remote host:port combination are dropping packets this would cause the
first connection to timeout (after waiting for the full timeout duration).
PHP would then attempt the second address and wait the full duration again.
Solution:
If the first connection attempt times out, abort the connection loop.
*_from_pipe() is for process-pipes created by fopen, not generic pipes
created from proc_open().
Correctly implemented the fifo/pipe check for *_from_file() and it seems
to be working correctly now.