ibm_db2

Extension for IBM Db2 (LUW/i/z) and other compatible databases


ibm_db2 provides access to DB2 and compatible databases on PHP.
It uses a procedural interface. (PDO users should use PDO_IBM instead.)

The following software is supported without any additional licenses:
- IBM Db2 (Linux/Unix/Windows)
- IBM Db2 for i (running on IBM i)
- Apache Derby

The following software may require additional licenses on the database:
- IBM Db2 Connect for i (for using Db2 for i from LUW)
- IBM Db2 Connect for z (for using Db2 for z from LUW)

Note that for IBM i, IBM and Seiden Group recommend new applications use ODBC instead.

License: Apache License 2.0

Latest releases

Version Release Download
2.2.0 2023-11-15 ibm_db2-2.2.0.tgz
2.1.7 2022-08-30 ibm_db2-2.1.7.tgz
2.1.6 2022-08-24 ibm_db2-2.1.6.tgz
2.1.5 2021-09-30 ibm_db2-2.1.5.tgz
2.1.3 2021-03-10 ibm_db2-2.1.3.tgz
Show all releases

Changelog

Version Message
2.2.0 - Support for PHP 8.3
- Support for boolean data type (IBM i 7.5, Db2/LUW 9.6)
- Passwords and connection strings are marked as sensitive parameters
- Build system improvements for finding driver library
- CI and test suite improvements
2.1.7 Corrects a packaging mistake in 2.1.6.
2.1.6 * 2022-08-24: 2.1.6
- Allows fetching the current naming mode with db2_get_option on IBM i.
- Uses the password (obfuscated in memory) as part of the persistent resource hash key. This means the password must be the same to reuse a persistent connection.
- Fixes build issues with 64-bit Windows.
- Fixes crashes with level 4 i5_check_pconnect.
- Cleans up CI for modern IBM i and PHP 8.1.
2.1.5 * 2021-09-30: 2.1.5
- Use the new persistent resource API introduced in 7.3 (PHP 7.3 is new minreq)
- Fix truncation issues in db2_result
- Fix typo with character trim
- Fix issues with trim returning empty string if it should only return one char
- Fix leaks with various functions (result, get_option, escape_string, etc.)
- Fix build issue with ulong on some platforms
2.1.3 * 2021-03-10: 2.1.3
- Report failures in SQLGetDiagRec. This should warn on many silent errors.
- Workaround issue with using SQLGetSubString with a large buffer on a DBCLOB
with locator by trimming from first instead of last null byte.
- Workaround bug in SQL/CLI caused by unknown PTF, which causes a buffer
overflow with SQLGetData on char-like values. The PTF causing the regression
is unidentified, but workaround PTFs seem to exist, including SI75759. The
workaround will likely be kept until most no longer have the defective PTF.
Show complete changelog