5.2 has reached end-of-life and will no longer receive
bugfixes or security patches from the PHP Project. Some downstream distributions may still continue to provide
backported fixes for a time, depending on their support policy.
Fixed bug #43452 (strings containing a weekday, or a number plus weekday behaved incorrect of the current day-of-week was the same as the one in the phrase).
Fixed bug #43353 (wrong detection of 'data' wrapper causes notice).
fixed bug #43053 (regression
Fixed bug #43045 (SOAP encoding violation on "INF" for type double/float).
fixed bug #42862 (imap toolkit crash
Fixed bug #42855 (dns_get_record() doesn't return all text from TXT record).
Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines).
Fixed bug #42718 (FILTER_UNSAFE_RAW not applied when configured as default filter).
Fixed bug #42604 ("make test" fails with --with-config-file-scan-dir=path).
fixed bug #42473 (ob_start php
Fixed bug #42318 (problem with nm on AIX, not finding object files).
Fixed bug #42294 (Unified solution for round() based on C99 round).
Fixed bug #42078 (pg_meta_data mix tables metadata from different schemas).
Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no default post handler).
Fixed bug #41291 (FastCGI does not set SO_REUSEADDR).
Fixed gd build when used with freetype 1.x
Fixed bug #41287 (Namespace functions don't allow xmlns definition to be optional).
Fixed bug #41285 (Improved fix for CVE-2007-1887 to work with non-bundled sqlite2 lib).
Fixed bug #41283 (Bug with deserializing array key that are doubles or floats in wddx).
Fixed bug #41257 (lookupNamespaceURI does not work as expected).
Fixed bug #41236 (Regression in timeout handling of non-blocking SSL connections during reads and writes).
Fixed bug #41134 (zend_ts_hash_clean not thread-safe).
Fixed bug #41097 (ext/soap returning associative array as indexed without using WSDL).
Fixed bug #41004 (minOccurs="0" and null class member variable).
Fixed bug #39542 (Behavior of require/include different to < 5.2.0).
PHP 5.2.2
Released 03 May, 2007
added tidynode
Added --ri switch to CLI which allows to check extension information.
added openbasedir and safemode checks in zip
Added php_pdo_sqlite_external.dll, a version of the PDO SQLite driver that links against an external sqlite3.dll. This provides Windows users to upgrade their sqlite3 version outside of the PHP release cycle.
Added linenumbers to array returned by token_get_all().
Upgraded SQLite 3 to version 3.3.16
Upgraded libraries bundled in the Windows distribution.
c-client to version 2006e
libpq to version 8.2.3
libmysql to version 5.0.37
openssl to version 0.9.8e
Upgraded PCRE to version 7.0
Updated timezone database to version 2007.5.
Fixed commandline handling for CLI and CGI.
Fixed iterator_apply() with a callback using __call().
Fixed possible multi bytes issues in openssl csr parser
Fixed shmop_open() with IPC_CREAT|IPC_EXCL flags on Windows. .
fixed possible leak in ziparchive
Fixed possible relative path issues in zip_open and TS mode (old API)
Fixed zend_llist_remove_tail
Fixed a thread safety issue in gd gif read code
Fixed CVE-2007-1001, GD wbmp used with invalid image size
Fixed unallocated memory access/double free in in array_user_key_compare() (MOPB-24 by Stefan Esser)
Fixed wrong length calculation in unserialize S type (MOPB-29 by Stefan Esser)
Fixed bug #39396 (stream_set_blocking crashes on Win32).
Fixed bug #39351 (relative include fails on Solaris).
Fixed bug #39322 (proc_terminate() destroys process resource).
Fixed bug #38406 (crash when assigning objects to SimpleXML attributes).
Fixed bug #37799 (ftp_ssl_connect() falls back to non-ssl connection).
Fixed bug #36496 (SSL support in imap_open() not working on Windows).
Fixed bug #36226 (Inconsistent handling when passing nillable arrays).
Fixed bug #35872 (Avoid crash caused by object store being referenced during RSHUTDOWN).
Fixed bug #34794 (proc_close() hangs when used with two processes).
Fixed PECL bug #10194 (crash in Oracle client when memory limit reached in the callback).
Fixed substr_compare and substr_count information leak (MOPB-14)
Fixed crash on op-assign where argument is string offset
Fixed bug #38710 (data leakage because of nonexisting boundary checking in statements in mysqli)
Fixed bug #37386 (autocreating element doesn't assign value to first node).
Fixed bug #37013 (server hangs when returning circular object references).
Fixed bug #33664 Console window appears when using exec()
PHP 5.2.1
Released 08 Feb, 2007
moved extensions to pecl
Removed double "wrong parameter count" warnings in various functions.
ext/informix
Changed double-to-string utilities to use BSD implementation.
Updated bundled libcURL to version 7.16.0 in the Windows distro.
Updated timezone database to version 2006.16.
cgi.* and fastcgi.* directives are moved to INI subsystem. The new directive cgi.check_shebang_line can be used to omitting check for "#! /usr/bin/php" line. .
Improved proc_open(). Now on Windows it can run external commands not through CMD.EXE.
VCWD_REALPATH() is improved to use realpath cache without VIRTUAL_DIR.
ext/bcmath initialization code is moved from request startup to module startup.
Zend Memory Manager Improvements
use HeapAlloc() instead of VirtualAlloc()
use "win32" storage manager on Windows by default
Zip Extension Improvements
Fixed leak in statName and stateIndex
Fixed return setComment
Added addEmptyDir method
Filter Extension Improvements
Fixed a bug when callback function returns a non-modified value.
Added filter support for $_SERVER in cgi/apache2 sapis.
Added "default" option that allows a default value to be set for an invalid or missing value.
Invalid filters fails instead of returning unsafe value
Fixed possible double encoding problem with sanitizing filters
Make use of space-strict strip_tags() function
Fixed whitespace trimming
Added support for FastCGI environment variables.
PDO_MySQL Extension Improvements
Enabled buffered queries by default.
Enabled prepared statement emulation by default.
Small optimization of the date() function.
Optimized the internal is_numeric_string() function.
Optimized array functions utilizing php_splice().
Windows related optimizations
COM initialization/deinitialization are done only if necessary
removed unnecessary checks for ISREG file and corresponding stat() calls
opendir() is reimplementation using GetFistFile/GetNextFile those are faster then _findfirst/_findnext
implemented registry cache that prevent registry lookup on each request. In case of modification of corresponding registry-tree PHP will reload it automatic
start timeout thread only if necessary
stat() is reimplementation using GetFileAttributesEx(). The new implementation is faster then implementation in MS VC CRT, but it doesn't support Windows 95.
Streams optimization
removed unnecessary ftell() calls
disabled calls to read() after EOF
Fixed incorrect function names on FreeBSD where inet_pton() was named __inet_pton() and inet_ntop() was named __inet_ntop().
Fixed FastCGI impersonation for persistent connections on Windows.
Fixed wrong signature initialization in imagepng
Fixed ftruncate() with negative size on FreeBSD.
Fixed segfault in RegexIterator when given invalid regex.
Fixed segfault in SplFileObject->openFile()->getPathname().
Fixed segfault in ZTS mode when OCI8 statements containing sub-statements are destroyed in wrong order.
Fixed the validate email filter so that the letter "v" can also be used in the user part of the email address.
Fixed bug #40297 (compile failure in ZTS mode when collections support is missing).
Fixed bug #40285 (The PDO prepare parser goes into an infinite loop in some instances).
Fixed bug #40274 (Sessions fail with numeric root keys).
Fixed bug #40259 (ob_start call many times - memory error).
Fixed bug #36798 (Error parsing named parameters with queries containing high-ascii chars).
Fixed bug #36644 (possible crash in variant_date_from_timestamp()).
Fixed bug #36427 (proc_open() / proc_close() leak handles on windows).
Fixed bug #36392 (wrong number of decimal digits with %e specifier in sprintf).
Fixed bug #36214 (__get method works properly only when conditional operator is used).
Fixed bug #35634 (Erroneous "Class declarations may not be nested" error raised).
Fixed bug #35106 (nested foreach fails when array variable has a reference).
Fixed bug #34564 (COM extension not returning modified "out" argument)
Fixed bug #33734 (Something strange with COM Object).
Fixed bug #33386 (ScriptControl only sees last function of class).
Fixed bug #33282 (Re-assignment by reference does not clear the is_ref flag)
Fixed bug #30074 (apparent symbol table error with extract($blah, EXTR_REFS))
Fixed bug #29840 (is_executable() does not honor safe_mode_exec_dir setting).
PHP 5.2.0
Released 02 Nov, 2006
added soapserver
Added DSA key generation support to openssl_pkey_new(), FR #38731 (marci at balabit dot hu, Tony) SoapServer::setClass() method).
Added support for hexadecimal entity in imagettftext() for the bundled GD.
Added support for httpOnly flag for session extension and cookie setting functions.
Added version specific registry keys to allow different configurations for different php version.
Added "PHPINIDir" Apache directive to apache and apache_hooks SAPIs.
Added an optional boolean parameter to memory_get_usage() and memory_get_peak_usage() to get memory size allocated by emalloc() or real size of memory allocated from system.
Added Zip Archive extension.
Added RFC1867 fileupload processing hook.
Added JSON and Filter extensions.
Added error messages to disk_free_space() and disk_total_space() functions. FR #37971
Added PATHINFO_FILENAME option to pathinfo() to get the filename.
Added array_fill_keys() function.
Added posix_initgroups() function.
Added an optional parameter to parse_url() to allow retrieval of distinct URL components.
Added optional parameter to http_build_query() to allow specification of string separator.
Added image_type_to_extension() function.
Added allow_url_include ini directive to complement allow_url_fopen.
Added automatic module globals management.
added rfc2397 (data
Added new error mode E_RECOVERABLE_ERROR.
Added support for getenv() input filtering.
Added support for constructors in interfaces to force constructor signature checks in implementations.
Added memory_get_peak_usage() function for retrieving peak memory usage of a PHP script.
Added pg_field_table() function.
added domnode
Added gmp_nextprime() function.
Added error_get_last() function.
Removed current working directory from the php.ini search path for CLI and re-added it for other SAPIs (restore to pre 5.1.x behavior).
moved extensions to pecl
ext/filepro
ext/hwapi
Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are enabled.
Increased default memory limit to 16 megabytes to accommodate for a more accurate memory utilization measurement.
In addition to path to php.ini, PHPRC now may specify full file name.
Optimized array/HashTable copying.
Optimized zend_try/zend_catch macros by eliminating memcpy(3).
Optimized require_once() and include_once() by eliminating fopen(3) on second usage.
Optimized request shutdown sequence. Restoring ini directives now iterates only over modified directives instead of all.
Changed priority of PHPRC environment variable on win32 to be higher then value from registry.
Changed __toString() to be called wherever applicable.
Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR.
Changed realpath cache to be disabled when "open_basedir" or "safe_mode" are enabled on per-request basis.
improved snmp extension
Renamed snmp_set_oid_numeric_print() to snmp_set_oid_output_format().
Added 2 new constants: SNMP_OID_OUTPUT_FULL and SNMP_OID_OUTPUT_NUMERIC
Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2 compatibility issue).
improved openssl extension
Added support for all supported algorithms in openssl_verify
Added openssl_pkey_get_details, returns the details of a key
Added x509 v3 extensions support
Added openssl_csr_get_subject() and openssl_csr_get_public_key()
Added 3 new constants OPENSSL_VERSION_TEXT and OPENSSL_VERSION_NUMBER and OPENSSL_KEYTYPE_EC
Added "--enable-malloc-mm" configure option which is enabled by default in debug builds to allow using internal and external memory debuggers.
Allow tweaking the memory manager with ZEND_MM_MEM_TYPE and ZEND_MM_SEG_SIZE environment variables.
For more information: Zend/README.ZEND_MM
Improved safe_mode check for the error_log() function.
Improved the error reporting in SOAP extension on request failure.
Improved crypt() on win32 to be about 10 times faster and to have friendlier license.
Improved performance of the implode() function on associated arrays.
Improved performance of str_replace() when doing 1 char to 1 char or 1 char to many chars replacement.
improved apache2filter sapi
Allowed PHP to be an arbitrary filter in the chain and read the script from the Apache stream.
Added support for apache2filter in the Windows build including binary support for both Apache 2.0.x (php5apache2_filter.dll) and Apache 2.2.x (php5apache2_2_filter.dll).
improved apache2handler sapi
Changed ap_set_content_type() to be called only once.
Added support for Apache 2.2 handler in the Windows distribution.
improved fastcgi sapi
Removed source compatibility with libfcgi.
Optimized access to FastCGI environment variables by using HashTable instead of linear search.
Allowed PHP_FCGI_MAX_REQUESTS=0 that assumes no limit.
Allowed PHP_FCGI_CHILDREN=0 that assumes no worker children.
improved curl
Added control character checks for "open_basedir" and "safe_mode" checks.