Gustavo Lopes [Thu, 1 Nov 2012 19:38:42 +0000 (20:38 +0100)]
Wrap recvmsg() and sendmsg()
This introduces two new functions:
int socket_recvmsg(resource $socket, array &$msghdr, int $flags)
int socket_sendmsg(resource $socket, array $msghdr, int $flags)
The arrays representing struct msghdr follow the native counterpart
closely: structs are mapped to arrays, fields to array elements whose
key is the name of the field without the prefix (e.g. "name" instead
of "msg_name") and array are mapped to sequential numeric PHP arrays.
Right now the only type of ancillary data supported is fot the
level/type pair IPPROTO_IPV6/IPV6_PKTINFO.
I also refactored out the name resolution functions and made
sockets_strerror() a global function.
Gustavo Lopes [Sat, 2 Feb 2013 14:32:03 +0000 (15:32 +0100)]
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Fix wrong blocking state being set
Fix tests (Windows)
Remove a Windows only warning
Move & improve PHP_SOCKET_ERROR def
Move some declarations to sockets.c
Fix overbroad skipif include
Gustavo Lopes [Sat, 2 Feb 2013 14:31:44 +0000 (15:31 +0100)]
Merge branch 'sockets_54_improv' into PHP-5.4
* sockets_54_improv:
Fix wrong blocking state being set
Fix tests (Windows)
Remove a Windows only warning
Move & improve PHP_SOCKET_ERROR def
Move some declarations to sockets.c
Fix overbroad skipif include
Remi Collet [Fri, 1 Feb 2013 18:23:25 +0000 (19:23 +0100)]
Fixed bug #64128 buit-in web server is broken on ppc64.
fdset management using bit operator is broken on non-x86 arch
and cause built-in server the enter an infinite loop of "select"
and never handle any request.
Nikita Popov [Fri, 1 Feb 2013 17:33:26 +0000 (18:33 +0100)]
Fix segfault when cloning generator with properties
Rule of thumb: Always implement the object clone handler rather
than the object storage clone handler. Actually I think we should
drop the latter. It's nearly never usable.
Daniel Lowrey [Wed, 30 Jan 2013 19:45:31 +0000 (14:45 -0500)]
Added ssl context option, "disable_compression"
The CRIME attack vector exploits TLS compression. This patch adds a stream context option
allowing servers to disable TLS compression for versions of OpenSSL >= 1.0.0 (which first
introduced the SSL_OP_NO_COMPRESSION option). A summary rundown of the CRIME attack can
be found at https://community.qualys.com/blogs/securitylabs/2012/09/14/crime-information-leakage-attack-against-ssltls
Thanks to @DaveRandom for pointing out the relevant section of code.
Nikita Popov [Wed, 30 Jan 2013 22:52:02 +0000 (23:52 +0100)]
Fix potential segfault when finally in a generator is run during shutdown
If a generator is destroyed in a finally block it will resume the generator to run that finally
block before freeing the generator. This was done in the object storage free handler.
Running user code in the free handler isn't safe though because the free handlers may be run
during request shutdown, already after several key components have been shut down.
This is avoided by doing the finally handling in the dtor handler. These handlers are run at the
start of the shutdown sequence.
ALeX Kazik [Fri, 18 Jan 2013 16:13:39 +0000 (17:13 +0100)]
Implemented Feature #60524 (sys_temp_dir)
Added a new configuration directive which allows it to change the
temporary directory, the default behavior is unchanged.
This is a useful option if you use all/some hosts inside of one .ini file
with sections and want to change the temp dir per user (maybe it's not
allowed to write outside the users home directory). Since the TMPDIR
variable affects the whole php that way can not be used for this scenario.
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
fix valgrind warning
Fix bug #64023 (__toString() & SplFileInfo)
Fix test related to change for #bug64007 and also fix in newInstanceArgs
NEWS: Start PHP 5.5.0 Beta 1 section
NEWS for PHP 5.5.0alpha4
Fix NEWS
Gustavo Lopes [Sat, 19 Jan 2013 15:21:26 +0000 (16:21 +0100)]
Fix bug #64023 (__toString() & SplFileInfo)
Defining a __toString() method was having no effect when concatenating
the object. This was because the cast_object() handler would ignore
__toString().
Using echo() directly would actually use __toString(), but this was a
bug: the ECHO handler would try zend_std_cast_object_tostring() before
cast_object(), but cast_object() should have priority as
zend_std_cast_object_tostring() assumes an object with a
zend_class_entry.
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
Merge fix of #62836 to ?.re, and regenerate ?.c
Fixed bug #64007 (There is an ability to create instance of Generator by hand).
- Fixed ZTS build
Class Name Resolution As Scalar Via "class" Keyword
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
Fixed bug #63988 (Two Date tests fail) only for PHP-5.5
- Fixed ZTS build
Dereferencing process-handles no longer waits on those processes.
revert change. now it doesn't compile again...someone should fix ext/date...
Use two dtors thus allow allocation based on the alloc model of the connection.
plug a leak - forgot ot use the dtor already written
Revert "Apply the fputcsv test fix to SplFileObject_fputcsv.phpt. Mea culpa."
Revert "Update fputcsv() to escape all characters equally."
Add support for connect attributes, as of MySQL 5.6
Bug #62489: dba_insert not working as expected
UPGRADING.INTERNALS: document zend_qsort_r
Add zend_qsort_r & use it in strtr
NEWS for bug #63893
Update README.PARAMETER_PARSING_API
Export zend_parse_parameter()
Expose zend_parse_arg() as zend_parse_parameter()
zend_parse_parameters: allow ! for non pointers
* PHP-5.4:
fix bug #63462 (Magic methods called twice for unset protected properties)
NEWS for bug #64011. See 77ee200
Fix bug #64011 (get_html_translation_table())
Fix News
Update the arguments in the prototype of fpm_socket_unix_test_connect().
fixed build
NEWS for bug #63893
Fixed inconsequential bug in strtr()
Revert "Apply the fputcsv test fix to SplFileObject_fputcsv.phpt. Mea culpa."
Revert "Update fputcsv() to escape all characters equally."
Remove _GNU_SOURCE, add local heap sort
The compiler can figure this out
Remove unused block
strtr() with 2nd param array - optimization
Refactoring, bugs & leaks
Optimize strtr w/ 2nd arg array