PHP Release 5.2.7


PHP 5.2.7 Release Announcement

The PHP development team would like to announce the immediate availability of PHP 5.2.7. This release focuses on improving the stability of the PHP 5.2.x branch with over 120 bug fixes, several of which are security related. All users of PHP are encouraged to upgrade to this release.

Security Enhancements and Fixes in PHP 5.2.7:

  • Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371)
  • Fixed missing initialization of BG(page_uid) and BG(page_gid), reported by Maksymilian Arciemowicz.
  • Fixed incorrect php_value order for Apache configuration, reported by Maksymilian Arciemowicz.
  • Fixed a crash inside gd with invalid fonts (Fixes CVE-2008-3658).
  • Fixed a possible overflow inside memnstr (Fixes CVE-2008-3659).
  • Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666.
  • Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots)).(Fixes CVE-2008-3660)
  • Fixed bug #42862 (IMAP toolkit crash: rfc822.c legacy routine buffer overflow). (Fixes CVE-2008-2829)

Key enhancements in PHP 5.2.7 include:

  • Fixed several memory leaks inside the readline and sqlite extensions
  • A number of corrections relating to date parsing inside the date extension
  • Fixed bugs relating to data retrieval in the PDO extension
  • A series of crashes in various areas of code were resolved
  • Several corrections were made to the strip_tags() function in terms of < and <?XML handling
  • A number of bugs were fixed in extract() function when EXTR_REFS flag is being used
  • Added the ability to log PHP errors to the SAPI (Ex. Apache log) logging facility
  • Over 170 bug fixes.

For users upgrading from PHP 5.0 and PHP 5.1, an upgrade guide is available here, detailing the changes between those releases and PHP 5.2.7.

For a full list of changes in PHP 5.2.7, see the ChangeLog.

Source Code
Change Logs
fixed endless loop in pdostatement
  • Fixed stream_get_line() to behave as documented on non-blocking streams. (Arnaud)
  • Fixed ability to use "internal" heaps in extensions.
  • Fixed weekdays adding/subtracting algorithm.
  • Fixed some ambiguities in the date parser.
  • Fixed a bug with the YYYY-MM format not resetting the day correctly.
  • Fixed a bug in the DateTime->modify() methods, it would not use the advanced relative time strings.
  • Fixed extraction of zip files or directories when the entry name is a relative path.
  • Fixed read or write errors for large zip archives.
  • Fixed security issues detailed in CVE-2008-2665 and CVE-2008-2666.
  • Fixed simplexml asXML() not to lose encoding when dumping entire document to file.
  • Fixed a crash inside PDO when trying instantiate PDORow manually.
  • Fixed build failure of ext/mysqli with libmysql 6.0 - missing rplfunctions.
  • Fixed a regression when using strip_tags() and < is within an attribute.(Scott)
  • Fixed a crash on invalid method in ReflectionParameter constructor.
  • Fixed bug #46732 (mktime.year description is wrong).
  • Fixed bug #46696 (cURL fails in upload files with specified content-type).
  • Fixed bug #46673 (stream_lock call with wrong parameter).
  • Fixed bug #46649 (Setting array element with that same array produces inconsistent results).
  • Fixed bug #46626 (mb_convert_case does not handle apostrophe correctly).
  • Fixed bug #46543 (ibase_trans() memory leaks when using wrong parameters).
  • Fixed bug #46521 (Curl ZTS OpenSSL, error in config.m4 fragment).
  • Fixed bug #46496 (wddx_serialize treats input as ISO-8859-1).
  • Fixed bug #46427 (SoapClient() stumbles over its "stream_context" parameter).
  • Fixed bug #46426 (offset parameter of stream_get_contents() does not workfor "0").
  • Fixed bug #46406 (Unregistering nodeclass throws E_FATAL).
  • Fixed bug #46389 (NetWare needs small patch for _timezone).
  • Fixed bug #46388 (stream_notification_callback inside of object destroys object variables).
  • Fixed bug #46381 (wrong $this passed to internal methods causes segfault).
  • Fixed bug #46379 (Infinite loop when parsing '#' in one line file).
  • Fixed bug #46366 (bad cwd with / as pathinfo).
  • Fixed bug #46360 (TCP_NODELAY constant for socket_{get,set}_option).
  • Fixed bug #46343 (IPv6 address filter accepts invalid address).
fixed bug #46335 (domtext
  • Fixed bug #46323 (compilation of simplexml for NetWare breaks).
  • Fixed bug #46319 (PHP sets default Content-Type header for HTTP 304 response code, in cgi sapi).
  • Fixed bug #46313 (Magic quotes broke $_FILES).
  • Fixed bug #46308 (Invalid write when changing property from inside getter).
fixed bug #46292 (pdo
  • Fixed bug #46274, #46249 (pdo_pgsql always fill in NULL for empty BLOB and segfaults when returned by SELECT).
  • Fixed bug #46271 (local_cert option is not resolved to full path).
  • Fixed bug #46247 (ibase_set_event_handler() is allowing to pass callback without event).
  • Fixed bug #46246 (difference between call_user_func(array($this, $method)) and $this->$method()).
  • Fixed bug #46222 (ArrayObject EG(uninitialized_var_ptr) overwrite).
  • Fixed bug #46215 (json_encode mutates its parameter and has some class-specific state).
  • Fixed bug #46206 (pg_query_params/pg_execute convert passed values to strings).
fixed bug #46191 (bc break
  • Fixed bug #46164 (stream_filter_remove() closes the stream).
fixed bug #46157 (pdostatement
  • Fixed bug #46147 (after stream seek, appending stream filter reads incorrect data).
  • Fixed bug #46139 (PDOStatement->setFetchMode() forgets FETCH_PROPS_LATE).
  • Fixed bug #46127 (php_openssl_tcp_sockop_accept forgets to set context on accepted stream)
  • Fixed bug #46110 (XMLWriter - openmemory() and openuri() leak memory on multiple calls).
fixed bug #46088 (regexiterator
  • Fixed bug #46082 (stream_set_blocking() can cause a crash in some circumstances).
  • Fixed bug #46064 (Exception when creating ReflectionProperty object on dynamicly created property).
  • Fixed bug #46059 (Compile failure under IRIX 6.5.30 building posix.c).
fixed bug #46051 (splfileinfo
  • Fixed bug #46047 (SimpleXML converts empty nodes into object with nested array).
fixed bug #46031 (segfault in appenditerator
  • Fixed bug #46029 (Segfault in DOMText when using with Reflection).
  • Fixed bug #46026 (bzip2.decompress/zlib.inflate filter tries to decompress after end of stream).
  • Fixed bug #46024 (stream_select() doesn't return the correct number).
  • Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode).
  • Fixed bug #46003 (isset on nonexisting node return unexpected results).
  • Fixed bug #45956 (parse_ini_file() does not return false with syntax errors in parsed file).
  • Fixed bug #45901 (wddx_serialize_value crash with SimpleXMLElement object).
  • Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and 'private' variables).
  • Fixed bug #45860 (header() function fails to correctly replace all Status lines).
  • Fixed bug #45805 (Crash on throwing exception from error handler).
fixed bug #45765 (reflectionobject with default parameters of self
  • Fixed bug #45751 (Using auto_prepend_file crashes (out of scope stack address use)).
  • Fixed bug #45722 (mb_check_encoding() crashes).
  • Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter).
  • Fixed bug #45691 (Some per-dir or runtime settings may leak into other requests).
  • Fixed bug #45581 (htmlspecialchars() double encoding &#x hex items).
  • Fixed bug #45580 (levenshtein() crashes with invalid argument).
  • Fixed bug #45575 (Segfault with invalid non-string as event handler callback).
  • Fixed bug #45568 (ISAPI doesn't properly clear auth_digest in header).
  • Fixed bug #45556 (Return value from callback isn't freed).
  • Fixed bug #45555 (Segfault with invalid non-string as register_introspection_callback).
  • Fixed bug #45553 (Using XPath to return values for attributes with a namespace does not work).
  • Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave different).
  • Fixed bug #45522 (FCGI_GET_VALUES request does not return supplied values).
fixed bug #45486 (mb_send_mail(); header 'content-type
  • Fixed bug #45485 (strip_tags and <?XML tag).
  • Fixed bug #45460 (imap patch for fromlength fix in imap_headerinfo doesn't accept lengths of 1024).
  • Fixed bug #45449 (filesize() regression using ftp wrapper).
  • Fixed bug #45423 (fastcgi parent process doesn't invoke php_module_shutdown before shutdown)
  • Fixed bug #45406 (session.serialize_handler declared by shared extension fails).
  • Fixed bug #45405 (snmp extension memory leak).
  • Fixed bug #45382 (timeout bug in stream_socket_enable_crypto).
  • Fixed bug #45373 (php crash on query with errors in params).
  • Fixed bug #45352 (Segmentation fault because of tick function on second request).
  • Fixed bug #45312 (Segmentation fault on second request for array functions).
fixed bug #45303 (opening php
  • Fixed bug #45251 (double free or corruption with setAttributeNode()).
  • Fixed bug #45226 and #18916 (xmlrpc_set_type() segfaults and wrong behavior with valid ISO8601 date string).
  • Fixed bug #45220 (curl_read callback returns -1 when needs to return size_t (unsigned)).
  • Fixed bug #45181 (chdir() should clear relative entries in stat cache).
  • Fixed bug #45178 (memory corruption on assignment result of "new" by reference).
  • Fixed bug #45166 (substr() overflow changes).
  • Fixed bug #45151 (Crash with URI/file..php (filename contains 2 dots)). (Fixes CVE-2008-3660)
  • Fixed bug #45139 (ReflectionProperty returns incorrect declaring class).
  • Fixed bug #45124 ($_FILES['upload']['size'] sometimes return zero and some times the filesize).
  • Fixed bug #45028 (CRC32 output endianness is different between crc32() and hash()).
  • Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
  • Fixed bug #44991 (Compile Failure With freetds0.82).
  • Fixed bug #44938 (gettext functions crash with overly long domain).
  • Fixed bug #44925 (preg_grep() modifies input array).
  • Fixed bug #44900 (OpenSSL extension fails to link with OpenSSL 0.9.6).
  • Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable as function parameter.
  • Fixed bug #44882 (SOAP extension object decoding bug).
  • Fixed bug #44830 (Very minor issue with backslash in heredoc).
fixed bug #44818 (php
  • Fixed bug #44811 (Improve error message when creating a new SoapClient that contains invalid data).
  • Fixed bug #44798 (Memory leak assigning value to attribute).
  • Fixed bug #44716 (Progress notifications incorrect).
  • Fixed bug #44712 (stream_context_set_params segfaults on invalid arguments).
  • Fixed bug #44617 (wrong HTML entity output when substitute_character=entity).
  • Fixed bug #44607 (stream_get_line unable to correctly identify the "ending" in the stream content).
  • Fixed bug #44425 (Extending PDO/MySQL class with a __call() function doesn't work).
fixed bug #44327 (pdorow
  • Fixed bug #44251, #41125 (PDO + quote() + prepare() can result in segfault).
  • Fixed bug #44246 (closedir() accepts a file resource opened by fopen()).
  • Fixed bug #44182 (extract($a, EXTR_REFS) can fail to split copy-on-write references).
  • Fixed bug #44181 (extract($a, EXTR_OVERWRITE|EXTR_REFS) can fail to create references to $a).
  • Fixed bug #44127 (UNIX abstract namespace socket connect does not work).
  • Fixed bug #43993 (mb_substr_count() behaves differently to substr_count() with overlapping needles).
  • Fixed Bug #43958 (class name added into the error message).
  • Fixed bug #43941 (json_encode silently cuts non-UTF8 strings).
  • Fixed bug #43925 (Incorrect argument counter in prepared statements with pgsql).
fixed bug #43731 (socket_getpeername
  • Fixed bug #43723 (SOAP not sent properly from client for <choice>).
  • Fixed bug #43668 (Added odbc.default_cursortype to control the ODBCcursor model).
  • Fixed bug #43666 (Fixed code to use ODBC 3.52 datatypes for 64bit systems).
  • Fixed bug #43540 (rfc1867 handler newlength problem).
  • 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 #41348 (oci8
  • Fixed bug #41033 (enable signing with DSA keys.
  • Fixed bug #37100 (data is returned truncated with BINARY CURSOR).
  • Fixed bug #30312 (crash in sybase_unbuffered_query() function).
  • Fixed bug #24679 (pg_* functions doesn't work using schema).
fixed bug #14962 (pecl) (
  • Fixed bug #14032 (Mail() always returns false but mail is sent).
To Top