PHP Release 5.1.3


PHP 5.1.3. Release Announcement

The PHP development team is proud to announce the release of PHP 5.1.3. This release combines small number of feature enhancements with a significant amount of bug fixes and resolves a number of security issues. All PHP users are encouraged to upgrade to this release as soon as possible.

The security issues resolved include the following:

  • Disallow certain characters in session names.
  • Fixed a buffer overflow inside the wordwrap() function.
  • Prevent jumps to parent directory via the 2nd parameter of the tempnam() function.
  • Enforce safe_mode for the source parameter of the copy() function.
  • Fixed cross-site scripting inside the phpinfo() function.
  • Fixed offset/length parameter validation inside the substr_compare() function.
  • Fixed a heap corruption inside the session extension.
  • Fixed a bug that would allow variable to survive unset().

The feature enhancements include the following notables:

  • The use of the var keyword to declare properties no longer raises a deprecation E_STRICT.
  • FastCGI interface was completely reimplemented.
  • Multitude of improvements to the SPL, SimpleXML, GD, CURL and Reflection extensions.
  • Support for many additional date formats added to the strtotime() function.
  • A number of performance improvements added to the engine and the core extensions.
  • Added imap_savebody() that allows message body to be written to a file.
  • Added lchown() and lchgrp() to change user/group ownership of symlinks.
  • Upgraded bundled PCRE library to version 6.6

The release also includes over 120 bug fixes with a focus on:

  • Make auto_globals_jit work without too many INI changes.
  • Fixed tiger hash algorithm generating wrong results on big endian platforms.
  • Fixed a number of errors in the SOAP extension.
  • Fixed recursion handling in the serialize() functionality.
  • Make is_*() function account of open_basedir restrictions.
  • Fixed a number of crashes in the DOM and PDO extensions.
  • Addressed a number of regressions in the strtotime() function.
  • Make memory_limit work in Win32 systems.
  • Fixed a deadlock in the sqlite extension caused by the sqlite_fetch_column_types() function.
  • Fixed memory leaks in the realpath() cache.

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

Source Code
Change Logs
moved extensions to pecl
  • Updated bundled PCRE library to version 6.6.
  • ext/msession
  • Reimplemented FastCGI interface.
improved spl
  • Fixed issues with not/double calling of constructors of SPL iterators.
  • Fixed issues with info-class/file-class in SPL directory handling classes.
  • Fixed ArrayIterator::seek().
  • Added SimpleXMLIterator::count().
  • Dropped erroneous RecursiveDirectoryIterator::getSubPathInfo().
improved simplexml
  • Added SimpleXMLElement::getName() to retrieve name of element.
  • Added ability to create elements on the fly.
  • Added addChild() method for element creation supporting namespaces.
  • Added addAttribute() method for attribute creation supporting namespaces.
  • Added ability to delete specific elements and attributes by offset.
improved reflection api
  • Added ReflectionClass::newInstanceArgs($args).
  • Added ability to analyze extension dependency.
  • Added ReflectionFunction::isDeprecated() and constant IS_DEPRECATED.
  • Added ReflectionParameter::getDeclaringClass().
  • Changed reflection constants to be prefixed with IS_.
improved curl extension
  • Added curl_setopt_array() function that allows setting of multiple options via an associated array.
  • Added the ability to retrieve the request message sent to the server.
improved gd extension
  • Added a weak/tolerant mode to the JPEG loader.
  • Added filtering mode option to imagepng() to allow reducing file size.
  • Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE on error.
  • Changed get_headers() to retrieve headers also from non-200 responses.
  • Changed get_headers() to use the default context.
  • Added lchown() and lchgrp() to change user/group ownership of symlinks.
  • Added support for exif date format in strtotime().
  • Added a check for special characters in the session name.
  • Added "consumed" stream filter.
added new mysqli constants for bit and new_decimal field types
  • Added imap_savebody() that allows message body to be written to a file.
  • Added overflow checks to wordwrap() function.
  • Added support for BINARY_DOUBLE and BINARY_FLOAT to PDO_OCI and OCI8 (also fixes bug #36764).
  • Eliminated run-time constant fetching for TRUE, FALSE and NULL.
  • Removed the E_STRICT deprecation notice from "var".
  • Fixed reading stream filters never notified about EOF.
  • Fixed tempnam() 2nd parameter to be checked against path components.
  • Fixed a bug that would not fill in the fifth argument to preg_replace() properly, if the variable was not declared previously.
  • Fixed safe_mode check for source argument of the copy() function.
  • Fixed mysqli bigint conversion under Windows
  • Fixed XSS inside phpinfo() with long inputs.
  • Fixed Apache2 SAPIs header handler modifying header strings.
  • Fixed 'auto_globals_jit' to work together with 'register_argc_argv'.
  • Fixed offset/length parameter validation in substr_compare() function.
  • Fixed debug_zval_dump() to support private and protected members.
fixed soapfault
  • Fixed issue with iconv_mime_decode where the "encoding" would only allow upper case specifiers.
  • Fixed tiger hash algorithm generating wrong results on big endian platforms.
fixed crash with domimplementation
  • Fixed bug #37205 (Serving binary content/images fails with "comm with server aborted" FastCGI err).
  • Fixed bug #37192 (cc may complain about non-constant initializers in hash_adler.c).
  • Fixed bug #37191 (chmod takes off sticky bit when safe_mode is On).
  • Fixed bug #37167 (PDO segfaults when throwing exception from the fetch handler).
  • Fixed bug #37162 (wddx does not build as a shared extension).
  • Fixed bug #37158 (fread behavior changes after calling stream_wrapper_register).
  • Fixed bug #37138 (__autoload tries to load callback'ed self and parent).
  • Fixed bug #37103 (libmbfl headers not installed).
  • Fixed bug #37062 (compile failure on ARM architecture).
  • Fixed bug #37061 (curl_exec() doesn't zero-terminate binary strings).
fixed bug #37060 (type of retval of countable
  • Fixed bug #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW fields).
  • Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings, which are unaccessible).
  • Fixed bug #37055 (incorrect reference counting for persistent OCI8 connections).
  • Fixed bug #37054 (SoapClient Error Fetching http headers).
  • Fixed bug #37053 (html_errors with internal classes produces wrong links).
  • Fixed bug #37046 (foreach breaks static scope).
  • Fixed bug #37045 (Fixed check for special chars for http redirects).
fixed bug #37017 (strtotime fails before 13
  • Fixed bug #37002 (Have to quote literals in INI when concatenating with vars). z
  • Fixed bug #36988 (mktime freezes on long numbers).
  • Fixed bug #36981 (SplFileObject->fgets() ignores max_length).
  • Fixed bug #36957 (serialize() does not handle recursion).
  • Fixed bug #36944 (strncmp & strncasecmp do not return false on negative string length).
  • Fixed bug #36941 (ArrayIterator does not clone itself).
  • Fixed bug #36934 (OCILob->read() doesn't move internal pointer when reading 0's).
  • Fixed bug #36908 (wsdl default value overrides value in soap request).
  • Fixed bug #36898 (__set() leaks in classes extending internal ones).
  • Fixed bug #36886 (User filters can leak buckets in some situations).
  • Fixed bug #36878 (error messages are printed even though an exception has been thrown).
  • Fixed bug #36875 (is_*() functions do not account for open_basedir).
  • Fixed bug #36872 (session_destroy() fails after call to session_regenerate_id(true)).
  • Fixed bug #36869 (memory leak in output buffering when using chunked output).
  • Fixed bug #36859 (DOMElement crashes when calling __construct when cloning).
  • Fixed bug #36857 (Added support for partial content fetching to the HTTP streams wrapper).
  • Fixed bug #36851 (Documentation and code discrepancies for NULL data in oci_fetch_*() functions).
fixed bug #36825 (exceptions thrown in arrayobject
  • Fixed bug #36820 (Privileged connection with an Oracle password file fails).
  • Fixed bug #36809 (__FILE__ behavior changed).
  • Fixed bug #36808 (syslog ident becomes garbage between requests).
  • Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection).
fixed bug #36749 (soap
  • Fixed bug #36745 (No error message when load data local file isn't found).
  • Fixed bug #36743 (In a class extending XMLReader array properties are not writable).
  • Fixed bug #36727 (segfault in pdo_pgsql bindValue() when no parameters are defined).
  • Fixed bug #36721 (The SoapServer is not able to send a header that it didn't receive).
  • Fixed bug #36697 (Transparency is lost when using imagecreatetruecolor).
  • Fixed bug #36689 (Removed arbitrary limit on the length of syslog messages).
  • Fixed bug #36656 (http_build_query generates invalid URIs due to use of square brackets).
  • Fixed bug #36638 (strtotime() returns false when 2nd argument < 1).
fixed bug #36629 (soapserver
  • Fixed bug #36625 (pg_trace() does not work).
  • Fixed bug #36614 (Segfault when using Soap).
  • Fixed bug #36611 (assignment to SimpleXML object attribute changes argument type to string).
  • Fixed bug #36606 (pg_query_params() changes arguments type to string).
  • Fixed bug #36599 (DATE_W3C format constant incorrect).
fixed bug #36572 (added pdo
  • Fixed bug #36568 (memory_limit setting on win32 has no effect).
  • Fixed bug #36513 (comment will be outputted in last line).
  • Fixed bug #36510 (strtotime() fails to parse date strings with tabs).
  • Fixed bug #36459 (Incorrect adding PHPSESSID to links, which contains \r\n).
  • Fixed bug #36458 (sleep() accepts negative values).
  • Fixed bug #36436 (DBA problem with Berkeley DB4).
  • Fixed bug #36434 (Improper resolution of declaring class name of an inherited property).
  • Fixed bug #36420 (segfault when access result->num_rows after calling result->close()).
  • Fixed bug #36403 (oci_execute() no longer supports OCI_DESCRIBE_ONLY).
  • Fixed bug #36400 (Custom 5xx error does not return correct HTTP response error code).
  • Fixed bug #36396 (strtotime() fails to parse dates in dd-mm-yyyy format).
  • Fixed bug #36388 (ext/soap crashes when throwing exception and session persistence).
  • Fixed bug #36382 (PDO/PgSQL's getColumnMeta() crashes).
fixed bug #36359 (splfileobject
  • Fixed bug #36351 (parse_url() does not parse numeric paths properly).
  • Fixed bug #36345 (PDO/MySQL problem loading BLOB over 1MB).
  • Fixed bug #36337 (ReflectionProperty fails to return correct visibility).
  • Fixed bug #36334 (Added missing documentation about realpath cache INI settings).
fixed bug #36308 (reflectionproperty
  • Fixed bug #36306 (crc32() differ on 32-bit and 64-bit platforms)
  • Fixed bug #36303 (foreach on error_zval produces segfault).
fixed bug #36295 (typo in splfileobject
  • Fixed bug #36287 (Segfault with SplFileInfo conversion).
  • Fixed bug #36283 (SOAPClient Compression Broken).
  • Fixed bug #36268 (Object destructors called even after fatal errors).
fixed bug #36258 (splfileobject
  • Fixed bug #36250 (PHP causes ORA-07445 core dump in Oracle server 9.2.x).
  • Fixed bug #36242 (Possible memory corruption in stream_select()).
  • Fixed bug #36235 (ocicolumnname returns false before a successful fetch).
  • Fixed bug #36226 (Inconsistent handling when passing potential arrays).
  • Fixed bug #36224 (date(DATE_ATOM) gives wrong results).
  • Fixed bug #36222 (errorInfo in PDOException is always NULL).
  • Fixed bug #36208 (symbol namespace conflicts using bundled gd).
  • Fixed bug #36205 (Memory leaks on duplicate cookies).
  • Fixed bug #36185 (str_rot13() crash on non-string parameter).
fixed bug #36176 (pdo_pgsql - pdo
  • Fixed bug #36158 (SIGTERM is not handled correctly when running as a FastCGI server).
  • Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP).
  • Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the end of the string).
  • Fixed bug #36134 (DirectoryIterator constructor failed to detect empty directory names).
  • Fixed bug #36113 (Reading records of unsupported type causes segfault).
  • Fixed bug #36096 (oci_result() returns garbage after oci_fetch() failed).
  • Fixed bug #36083 (SoapClient waits for responses on one-way operations).
  • Fixed bug #36071 (Engine Crash related with 'clone').
  • Fixed bug #36055 (possible OCI8 crash in multi-threaded environment).
  • Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values).
  • Fixed bug #36038 (ext/hash compile failure on Mac OSX).
  • Fixed bug #36037 (heredoc adds extra line number).
  • Fixed bug #36016 (realpath cache memleaks).
  • Fixed bug #36011 (Strict errormsg wrong for call_user_func() and the likes).
  • Fixed bug #36010 (Segfault when re-creating and re-executing statements with bound parameters).
  • Fixed bug #36006 (Problem with $this in __destruct()).
  • Fixed bug #35999 (recursive mkdir() does not work with relative path like "foo/bar").
fixed bug #35998 (splfileinfo
  • Fixed bug #35988 (Unknown persistent list entry type in module shutdown).
  • Fixed bug #35954 (Fatal com_exception casting object).
  • Fixed bug #35900 (stream_select() should warning when tv_sec is negative).
  • Fixed bug #35785 (SimpleXML causes memory read error zend engine).
  • Fixed bug #34272 (empty array onto COM object blows up).
  • Fixed bug #33292 (apache_get_modules() crashes on Windows).
  • Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever).
To Top