The PAT directory contains patches (fixes and improvements for the C source code behind PHP) that have been sent to the internal developers’ mailing list by members of the wider PHP community. The mailing list is fairly busy – as are the developers – and patches aren’t always noticed by someone able to review and perhaps apply them; this can lead to people repeatedly mailing the same patch to the list in the belief that they’re being ignored!
Zend’s DevZone team keep these ‘ignored’ patches online here, where the PHP development team can easily find them, until we know that each patch offered to the PHP project has been properly reviewed. The fate of patches that are no longer in the PAT directory is explained in the PAT section in the Zend Weekly Summaries.
|10 Feb 2007||OpenID for OpenSSL/PHP 5||Wez Furlong|
|"I’d like to tuck the attached patch into the PHP 5 branch. It provides the following functions, and does not modify the behavior of any of the others:
These functions allow one to implement OpenID and TypeKey authentication schemes without resorting to writing crypto code in user-space PHP–aside from the speed advantage, you have the benefit of using the tried and trusted OpenSSL for your DH kex."
|8 Feb 2007||Persistence for zend_stack||Mike Wallner|
|"Patch is against CVS HEAD."|
|24 Jan 2007||Multicast support for ext/sockets||Daniel Rozsnyo|
|"Last year I made a patch for full multicast support, and I think it
might be useful for others. Can somebody check if the implementation is correct (especially handling of
params/args) and then include it in the official source code?"
The patch was written against PHP 5.1.4. There is some background information
here. Tested under Gentoo only.
|5 Jan 2007||New array functions||John Bafford|
|This patch implements three new functions:
|22 Dec 2006||Recursive call to __get() error||Peter Hodge|
|This patch for 5.2 provides an alternative error when you accidentally call
Currently, PHP says:
which makes it seem as though
|15 Dec 2006||OpenSSL PKCS12 for PHP_5_2||Marc Delling|
|This patch implements the functions:
|12 Dec 2006||Extra space in php_java.jar||Alexandru Burciu|
|The extension is unable to load the library from the included php_java.jar
because the net\php\reflect.properties file contains an extra space at the
end of the line. This is a Windows only issue caused by misuse of the
file redirection operator when creating the .jar file.
|7 Nov 2006||Fix for apache2handler bug #39330||Olexander Shtepa|
|The apache2handler SAPI registers cleanup functions only for the
main Apache process, but Apache 2 cleans _only_ the child pool before it dies. This is the
reason for unclean persistent connection closes (e.g. in pgsql).
This patch adds shutdown actions registration to each child
behaviour in line with the Apache 1.3 handler.
|20 Oct 2006||–with-apache-includes||Tim Starling|
|"Just something I noticed while compiling PHP 5.2.0RC6 on Windows. It looks
like it’s been like this since the dawn of time, so it’s not a release
blocker. The attached patch makes
|19 Oct 2006||Parse error in HEAD||Matt Wilmas|
|"Probably not much chance of this happening, but while looking through HEAD’s
lexer/parser code (which word is correct? ), I noticed that there’s no
rule to match a backslash followed by a
resulting in “Unexpected character in input …” The
used to match this (as in 5.2), but was removed in version 1.132 of
|18 Oct 2006||mysql_set_charset()||Scott MacVicar|
|Patch for CVS HEAD updated by Scott, 8 February 2007. The other two still apply cleanly.
"This patch adds
extension, which should be applied to all branches.
The reason for the patch is that the
provided by the MySQL API sets the internal MySQL character set for the
connection, which is referenced by functions such as
Without the ability to change the character set on the connection users have to
internal character set.
In certain cases this can lead to an SQL Injection. I’ll simply refer
everyone to a
blog entry by Ilia. I’d like this consider this a security issue and get it applied to the
PHP 4 branch even though active development is more or less finished."
|3 Sept 2006||MySQLi connection sharing||Evan Nemerson|
|"I’m working on an extension for an RDF triple store that is built on top
of MySQL 5+, and I’d like to be able to share the MySQL connection with
mysqli. Unfortunately, since the mysqli header isn’t installed, I can’t
seem to find a way that could withstand changes in mysqli. What I’ve come
up with is to create a trivial function which will take a
and return a
trying to be as unintrusive as possible."
|14 July 2006||SimpleXML patch||Michael Gall|
|"I really liked the recent changes that were made to simplexml (
|21 June 2006||php_compat XML cleanup||Brian France|
|Brian had been trying to move an expat based extension to PHP 5, and felt
that the XML parts of php_compat.h need some attention. The only alternatives
available otherwise were for the application to move to libxml2, or else for
|14 May 2006||Read-only properties||Marcus Börger|
|This is Marcus’ response to Jason Garber’s request for read-only properties. A possibility for PHP 6, perhaps?|
|13 March 2006||ZSTR cast to union not working on g++||Cristiano Duarte|
The problem is that g++ is also
a code like this:
So I found at gcc.gnu.org that the “Cast to Union” GNU extension is just for
C not C++, here is the patch to the current CVS."
|24 Feb 2006||Late static binding||Mike Lively|
|Patch reviewed and updated by Dmitry Stogov, 30 March 2006: "The problem is that this seldom-used feature will slow down each PHP call. I’ll measure performance loss next week.
Please, test this patch too. I might have missed some edge cases."
|22 Dec 2005||Fractional timeouts||Andreas Schiffler|
|"This is the fractional timeout patch I made … its against the PHP_5_1 sources pulled from CVS this morning. It tries to cover all code that is found from a grep for
|10 Dec 2005||LDAP control support||Pierangelo Masarati|
|Note: A more recent patch (dated 15 June 2006) is available on Pierangelo’s server.
"This patch provides basic support for raw and well-known standard track LDAP controls and extended operations to the LDAP extension. It is intended for PHP HEAD code as of December 2005, but is known to apply to PHP 4 and 5. It should be preceded by the LDAP cleanup patch."
|10 Dec 2005||OpenLDAP C API cleanup patch||Pierangelo Masarati|
|"This patch provides misc cleanup of the LDAP extension according to the OpenLDAP API 2.3 and up. It is intended for CVS HEAD as of December 2005, but it is known to apply to PHP 4 and 5. It should be backward compatible at least with OpenLDAP 2.2. All requested features are detected at compile time, so it should not cause problems with any other LDAP API; simply, the extensions will not be available."|
|5 Dec 2005||glob() fixes for the 4_4 branch||Marcin Obara|
|See issue #266 for details (long-ish explanation). This still needs evaluation.|
|10 Nov 2005||Fix for ext/socket bug||Nuno Lopes|
|"This is a possible fix for ext/socket bug #21197. I haven’t tested bug #35062, but it seems to be a different bug…"|
|30 July 2005||Negative value for string offsets||Val Khokhlov|
|"This is a small patch that allows a negative value for
and so on…"
|29 June 2005||FastCGI memory management (reference only)||Andrew Prendergast|
|"This patch implements my proposed
Note: This patch is stored here for reference following a revival of interest in Feb 2007.
|26 June 2005||array_reduce()||David Tulloh|
|"This is a trivial patch to allow
|6 June 2005||dl() and shutdown, revisited||Wez Furlong|
|"I just spent the last hour or so tracking down a couple of mysterious ‘ht is already destroyed’ messages. It turns out that this is caused by
|26 May 2005||Double free, symbol table corruption in openssl||Kamesh Jayachandran|
|"The culprit is
|2 May 2005||Fix possible segfault with mb_ereg_replace||Kamesh Jayachandran|
At the end of the function 0 as the 3 argument to
line causes a seg fault.(As
|13 March 2005||PHP code highlighted with linenumbers||Johannes Schlüter|
|"I’ve implemented line numbering with
|7 March 2005||A return value for throw||Sara Golemon|
|"A user was asking about why he could perform statements such as:
|10 Feb 2005||Support for PGSQL’s geometric types||Benj Carson|
|"This patch for
|3 Feb 2005||ReflectionProperty getLinenumber||Johannes Schlüter|
|"This method corresponds to the already existing
|17 Nov 2004||Browscap parser||Jay Smith|
|This browscap parser was written with the hope of getting it into PHP 5.1.0…|
|24 Aug 2004||New function: posix_setrlimit()||Marcin Gibuła|
|"This patch adds the
|27 July 2004||Ref counting for odbc_connection resources||Dave Lawson|
|Reference deletion and
|27 July 2004||odbc resource leaks||Dave Lawson|
|"Several odbc functions do not initialize the
|27 July 2004||FP/DECIMAL/ROUNDING ISSUES||George Whiffen|
|Please see George’s long and detailed description. All three ‘udiffs’ are together in one file here.|
|21 July 2004||hijri.c||Mostapha|
|Mostapha mailed this to the internals list in the hope that someone could help him implement the Islamic calendar as part of ext/calendar.|