Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.

ibm_db2 Configure Options
Name Default Changeable Changelog
ibm_db2.binmode "1" PHP_INI_ALL  
ibm_db2.i5_all_pconnect "0" PHP_INI_SYSTEM Available since ibm_db2 1.6.5.
ibm_db2.i5_allow_commit "0" PHP_INI_SYSTEM Available since ibm_db2 1.4.9.
ibm_db2.i5_dbcs_alloc "0" PHP_INI_SYSTEM Available since ibm_db2 1.5.0.
ibm_db2.instance_name NULL PHP_INI_SYSTEM Available since ibm_db2 1.0.2.
ibm_db2.i5_ignore_userid "0" PHP_INI_SYSTEM Available since ibm_db2 1.8.0.

Here's a short explanation of the configuration directives.

ibm_db2.binmode int

This option controls the mode used for converting to and from binary data in the PHP application.

  • 1 (DB2_BINARY)

  • 2 (DB2_CONVERT)

  • 3 (DB2_PASSTHRU)

ibm_db2.i5_all_pconnect int

This option overrides i5 db2_connect() full open and close in the PHP application. When ibm_db2.i5_all_pconnect = 1, all db2 connections become persistent (db2_pconnect()). On i5/OS, db2_pconnect() performs dramatically better with lower machine stress over db2_connect(). This is a convenience override of db2_connect() to evoke db2_pconnect() without PHP source code changes.

ibm_db2.i5_allow_commit int

This option controls the isolation mode used for i5 schema collections in the PHP application (see i5_commit for override).

  • 0 - commitment control is not used

  • 1 - read uncommitted, dirty reads possible.

  • 2 - read committed, dirty reads are not possible.

  • 3 - repeatable read, dirty reads and non-repeatable reads are not possible

  • 4 - serializeable, dirty reads, non-repeatable reads, and phantoms are not possible

ibm_db2.i5_dbcs_alloc int

This option controls the internal ibm_db2 allocation scheme for large DBCS column buffers.

  • 0 no expanded allocations (see i5_dbcs_alloc for override)

  • 1 use expanded allocations (see i5_dbcs_alloc for override)

ibm_db2.instance_name string

On Linux and UNIX operating systems, this option defines the name of the instance to use for cataloged database connections. If this option is set, its value overrides the DB2INSTANCE environment variable setting.

This option is ignored on Windows operating systems.

ibm_db2.i5_ignore_userid int

This option overrides i5 db2_(p)connect userid and password in the PHP application. When ibm_db2.i5_ignore_userid = 1, all db2 (p)connections become null userid and null password. Therefore Apache jobs connect with the current profile (NOBODY). Use of this override is only for simple DB2 based websites that never require profile switching and therefore can avoid all overhead of server mode additional QSQSRVR jobs. This is a convenience override of db2_(p)connect to set the userid and password values to null without PHP source code changes. This override can be used in combination with ibm_db2.i5_all_pconnect = 1.

  • 0 db2_(p)connect with specified userid and password

  • 1 db2_(p)connect override connect with null userid and null password

add a note

User Contributed Notes 2 notes

yoshida at zend dot co dot jp
12 years ago
The explanation of ibm_db2.i5_dbcs_alloc seems to be hard to understand for me.

In ibm_db2 extension inside, 6 times length of string column is allocated if i5_dbcs_alloc value is 1.
The allocated area is used for conversion between UTF-8 and EBCDIC character encodings.

By the definition of UTF-8, letter length can need 6 bytes at the maximum.

In the case of a long column, allocated size may be beyond the upper limit defined in DB2 because original column is made by 6 times. It can cause result data becomes null.
Satoru Yoshida
10 years ago
The explanation of ibm_db2.i5_allow_commit seems to be slightly difficult to understand for me.

I think it would be better to replace "no commit" with "can not use commitment control" or "do not allow transaction", and "allow commit" would be changed into
"can use commitment control" or "allow transaction" , Thanks.
To Top