Changelog for ibm_db2
|
Release
| What has changed?
|
2.0.2-zs1 (201712–21) (test only)
| new - ini setting trim char result data
ibm_db2.ini
ibm_db2.i5_char_trim=1
-- or --
db2_connect($db,$uid,$pwd,array("i5_char_trim"=>DB2_I5_CHAR_TRIM_ON))
|
2.0.2 (201711–21) (pecl update)
| all updates are now in pecl 2.0.2.
|
2.0.1-zs2 (201711–13) (test only)
| Fix PHPDave leak in toolkit via stored procedure in/out param. (Thanks Dimitry!)
#if PHP_MAJOR_VERSION >= 7
/* Need use macro assignment to avoid leak in php 7. (Thanks Dimitry)
* Z_STR_P(*data) = zend_string_init(ZEND_Z_STRVAL_PP(data), ZEND_Z_STRLEN_PP(data), 0);
*/
ZVAL_STR(*data, zend_string_init(ZEND_Z_STRVAL_PP(data), ZEND_Z_STRLEN_PP(data), 0));
#else
ZEND_Z_STRVAL_PP(data) = estrndup(ZEND_Z_STRVAL_PP(data), ZEND_Z_STRLEN_PP(data));
#endif
}
/* make enough space for full write */
if (*poriglen < curr->param_size) {
#if PHP_MAJOR_VERSION >= 7
/* Need use macro assignment in php 7 (follow pattern zend_string_init)
* Z_STR_P(*data) = zend_string_extend(Z_STR_P(*data), curr->param_size + nullterm, 0);
*/
ZVAL_STR(*data, zend_string_extend(Z_STR_P(*data), curr->param_size + nullterm, 0));
#else
ZEND_Z_STRVAL_PP(data) = erealloc(ZEND_Z_STRVAL_PP(data), curr->param_size + nullterm);
#endif
|
2.0.1-zs1 (201711–09) (test only)
| executing flag to abandon persistent connection stored proc stuck in MSGW (Mark Stewart)
… both db2_exec and db2_prepare/db2_execute have executing flag now.
|
2.0.1 (201711–02) (pecl update)
| all updates are now in pecl 2.0.1.
- minus executing flag. toolkit xmlservice 2.0.0 will handle MSGW function (*call timeout)
|
1.9.9-zsb (201710–13) (test only)
| executing flag to abandon persistent connection stored proc stuck in MSGW (Mark Stewart)
.. added db2_exec … both db2_exec and db2_prepare/db2_execute have executing flag now.
|
1.9.9-zsa (201710–11) (test only)
| executing flag to abandon persistent connection stored proc stuck in MSGW (Mark Stewart)
|
1.9.7-zs6.4 (2017–10–03) (test only)
| fixes to 1.9.7
- fix SQ99999 RC9 Argument out of range (ibm_db2.i5_servermode_subsystem=)
- back ported all GUI default value changes from 1.9.9(removed -42)
|
1.9.9-zs9 (201709–19) (test only)
| small bind change from LUW group
> #ifdef PASE /* i5/OS -- do not remove length-1, breaks IBM i. Also null orig len breaks IBM i. */
4570d4570
< /* ZEND_Z_STRVAL_PP(data)[*poriglen] = '\0'; (LUW?) */
4574a4575,4579
> #else /* LUW -- request Abhinav Radke */
> if (nullterm) {
> ZEND_Z_STRVAL_PP(data)[*poriglen] = '\0';
> }
> #endif /* PASE */
4851c4856,4862
< curr->scale, paramValuePtr, Z_STRLEN_P(curr->value)+nullterm, &(curr->bind_indicator));
---
> curr->scale, paramValuePtr,
> #ifdef PASE /* i5/OS -- handled in pad routine */
> Z_STRLEN_P(curr->value)+nullterm,
> #else /* LUW -- request Abhinav Radke*/
> Z_STRLEN_P(curr->value)+nullterm+1,
> #endif
> &(curr->bind_indicator));
diff ibm_db2-1.9.9-zs7/./php_ibm_db2.h ibm_db2-1.9.9-zs9/./php_ibm_db2.h
26c26
< #define PHP_IBM_DB2_VERSION "1.9.9-zs7"
---
> #define PHP_IBM_DB2_VERSION "1.9.9-zs9"
|
1.9.9-zs8 (201709–15) (test only)
| small bind change from LUW group
< curr->scale, paramValuePtr, Z_STRLEN_P(curr->value)+nullterm, &(curr->bind_indicator));
---
> curr->scale, paramValuePtr, Z_STRLEN_P(curr->value)+nullterm+1, &(curr->bind_indicator));
|
1.9.9-zs7 (201709–12) (test only)
| Alan request change phpinfo (and remove −42)
$ cat README_INI_SETTINGS
Binary data mode (ibm_db2.binmode), 1 - DB2_BINARY <--default
Binary data mode (ibm_db2.binmode), 2 - DB2_CONVERT
Binary data mode (ibm_db2.binmode), 3 - DB2_PASSTHRU
DB2 instance name (ibm_db2.instance_name), "string" or "" <--default ""
Commitment control (ibm_db2.i5_allow_commit), 4 - DB2_I5_TXN_SERIALIZABLE
Commitment control (ibm_db2.i5_allow_commit), 3 - DB2_I5_TXN_REPEATABLE_READ
Commitment control (ibm_db2.i5_allow_commit), 2 - DB2_I5_TXN_READ_COMMITTED
Commitment control (ibm_db2.i5_allow_commit), 1 - DB2_I5_TXN_READ_UNCOMMITTED
Commitment control (ibm_db2.i5_allow_commit), 0 - DB2_I5_TXN_NO_COMMIT <--default
System naming mode (ibm_db2.i5_sys_naming), 1 - enabled
System naming mode (ibm_db2.i5_sys_naming), 0 - disabled <--default
DBCS extended conversion memory allocations (ibm_db2.i5_dbcs_alloc), 1 - enabled
DBCS extended conversion memory allocations (ibm_db2.i5_dbcs_alloc), 0 - disabled <--default
Force db2_connect to db2_pconnect (ibm_db2.i5_all_pconnect), 1 - enabled
Force db2_connect to db2_pconnect (ibm_db2.i5_all_pconnect), 0 - disabled <--default
Ignore userid/password (ibm_db2.i5_ignore_userid), 1 - enabled
Ignore userid/password (ibm_db2.i5_ignore_userid), 0 - disabled <--default
Job profile sort order (ibm_db2.i5_job_sort), 1 - enabled
Job profile sort order (ibm_db2.i5_job_sort), 0 - disabled <--default
Override PASE CCSID (ibm_db2.i5_override_ccsid), 1-99999 - enabled
Override PASE CCSID (ibm_db2.i5_override_ccsid), 0 - disabled <--default
Allow blank userid/password (ibm_db2.i5_blank_userid), 1 - enabled
Allow blank userid/password (ibm_db2.i5_blank_userid), 0 - disabled <--default
DB2 error log verbose (ibm_db2.i5_log_verbose), 1 - enabled
DB2 error log verbose (ibm_db2.i5_log_verbose), 0 - disabled <--default
Max use count db2_pconnect (ibm_db2.i5_max_pconnect), 1-99999 - enabled
Max use count db2_pconnect (ibm_db2.i5_max_pconnect), 0 - disabled <--default
Advanced db2_pconnect monitor (ibm_db2.i5_check_pconnect), 4 - exec/fetch test
Advanced db2_pconnect monitor (ibm_db2.i5_check_pconnect), 3 - create stmt test
Advanced db2_pconnect monitor (ibm_db2.i5_check_pconnect), 2 - get conn meta test
Advanced db2_pconnect monitor (ibm_db2.i5_check_pconnect), 1 - get conn attribute test <--default
DB2 server mode subsystem (ibm_db2.i5_servermode_subsystem), "string" or "" <--default ""
Guard profile (ibm_db2.i5_guard_profile), 1 - enabled
Guard profile (ibm_db2.i5_guard_profile), 0 - disabled <--default
|
1.9.9-zs6 (20170317) (test only)
| mfix multiple issues with types
-> fix DRDA to xmlservice
-> fix clobs 'too large'
-> better support $var='' different types
-> change default back to job ccsid
|
1.9.9-zs5 (20170105) (test only)
| fix db2_pclose. Issue may also affect other persistent connection close issues (maid service, etc.)
ibm_db2.c
#ifdef PASE /* db2_pclose - last ditch persistent close, but reuse zend hash.
Do not move this code, someone broke IBM i 1.9.9 (ADC) */
if (endpconnect) {
conn_res->hdbc = 0;
conn_res->flag_pconnect=9;
}
#endif /* PASE */
|
1.9.9-zs4 (20170105) (test only)
| multiple fixes PHP 7 symbol find for stored procedure calls
-> fix IS_REFERENCE php 7
-> fix SP with IN/OUT pad
-> fix misc core dumps
|
1.9.9-zs3 (20161128) (test only)
| Merge Zend submit changes with few fixes
Zend changes better deal with new php 7 macros, hash tables, etc.
Reset to fit test cases failure 'Value Not Bound'.
static int _php_db2_hash_find_ind(char * varname, int varlen, zval **temp, zval ***bind_data, zend_array ** symbol_table_used)
{
int rc = FAILURE;
zend_array * symbol_table_local; /* php 5.3+, php 7+ */
/* Fetch data from symbol table (local scope) */
#if PHP_MAJOR_VERSION >= 7
/* if (zend_hash_num_elements(&EG(symbol_table)) == 0) { (ADC undo Zend change) */
symbol_table_local = zend_rebuild_symbol_table();
/* } (ADC undo Zend change) */
*temp = zend_hash_str_find_ind(symbol_table_local, varname, varlen );
/* *temp = zend_hash_str_find_ind(&EG(symbol_table), varname, varlen); (ADC undo Zend change)*/
if (*temp != NULL) {
*bind_data = temp;
/* *symbol_table_used = &EG(symbol_table); (ADC undo Zend change) */
*symbol_table_used = symbol_table_local;
rc = SUCCESS;
}
== (previous change missing) ==
#ifdef PASE /* IBM i only one env handle, SQL_SUCCESS_WITH_INFO is good */
if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) {
rc = SQL_SUCCESS;
}
#endif /* PASE */
|
1.9.9-zs2 (20160927) (test only)
| Minor change, rc == SQL_SUCCESS_WITH_INFO, but may affects tests
static int _php_db2_connect_helper( INTERNAL_FUNCTION_PARAMETERS, conn_handle **pconn_res, int isPersistent )
{
:
conn_res->flag_pconnect = isPersistent;
/* Allocate ENV handles if not present */
if ( !conn_res->henv ) {
rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &(conn_res->henv));
#ifdef PASE /* IBM i only one env handle, SQL_SUCCESS_WITH_INFO is good */
if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) {
rc = SQL_SUCCESS;
}
#endif /* PASE */
if (rc != SQL_SUCCESS) {
_php_db2_check_sql_errors( conn_res->henv, SQL_HANDLE_ENV, rc, 1, NULL, -1, 1 TSRMLS_CC);
break;
}
#ifndef PASE /* IBM i not support SQL_ATTR_ODBC_VERSION */
rc = SQLSetEnvAttr((SQLHENV)conn_res->henv, SQL_ATTR_ODBC_VERSION, (void *)SQL_OV_ODBC3, SQL_IS_INTEGER);
#else /* IBM i enter server mode early (connect QSQSRVR jobs) */
|
1.9.9-zs1 (20160831) (test only)
| initial 1.9.9-zs1
start process of php7 LUW to IBM i port.
many changes to variables in php 7
|
1.9.7-zs6.3 (2016–08–25) (test only)
| fixes to 1.9.7
- correct issues with user db2_close and db2_pclose
- problem varchar/other padded with blanks, plus sql 99999 connect issues last fix
- remove 10 errors with free sql_env
|
1.9.7-sg5 (2015–05–24) pecl 1.9.7
| Official release: https://pecl.php.net/package/ibm_db2
IBM i ibm_db2.ini defaults changed:
1) Default setting ibm_db2.ini is tables with journal enabled (DB2 system default).
if you experience no journal table errors (CPF4328),
please modify ibm_db2.ini to ibm_db2.i5_allow_commit=0 (*NONE).
2) Default setting PASE CCSID is database UTF-8/1208 (Unicode).
if you experience CCSID issues, re-enable older PASE CCSID conversions,
please modify ibm_db2.ini ibm_db2.i5_override_ccsid=0, .
3) Default setting no longer allows blank userid/password.
To re-enable older blank userid/password insecure behaviour,
please modify ibm_db2.ini to ibm_db2.i5_blank_userid=1.
Try these settings for older IBM i tables without journal and/or older security behavior (';' - comment):
$ cat /usr/local/zendsvr6/etc/conf.d/ibm_db2.ini
extension=ibm_db2.so
ibm_db2.i5_allow_commit=0
ibm_db2.i5_override_ccsid=0
ibm_db2.i5_blank_userid=1
; ===========
; details
; ===========
;ibm_db2.i5_allow_commit=[0..4]
;0 - DB2_I5_TXN_NO_COMMIT - Commitment control is not used (set no journal, if see CPF4328)
;1 - DB2_I5_TXN_READ_UNCOMMITTED - Dirty reads. (default most machines)
;2 - DB2_I5_TXN_READ_COMMITTED - Dirty reads are not possible.
;3 - DB2_I5_TXN_REPEATABLE_READ - Dirty reads and nonrepeatable reads are not possible.
;4 - DB2_I5_TXN_SERIALIZABLE - Dirty reads, non-repeatable reads, and phantoms are not possible
;ibm_db2.i5_override_ccsid=[0, ascii ccsid]
;1208 - UTF-8 ccsid (default)
;!0 - other pase ccsid
; 0 - original PASE 'job guess' ccsid
;ibm_db2.i5_blank_userid=[0,1]
;0 - normal no blank user/pwd db2 connect (default)
;1 - allow blank user/pwd db2 connect
;ibm_db2.i5_dbcs_alloc=[0,1]
;0 - normal allocations (default)
;1 - expanded allocations for conversion
;ibm_db2.i5_all_pconnect=[0,1]
;0 - normal db2_connect (default)
;1 - force db2_connect to db2_pconnect
;ibm_db2.i5_ignore_userid=[0,1]
;0 - normal user/pwd using QSQSRVR job (default)
;1 - force ignore user/pwd, when possible, no QSQSRVR job
;ibm_db2.i5_job_sort=[0,1]
;0 - normal sort order (default)
;1 - profile sort order
;ibm_db2.i5_log_verbose=[0,1]
;0 - normal php.log message (default)
;1 - expanded php.log messages
;ibm_db2.i5_max_pconnect=[0,n]
;0 - normal nomax db2 persistent connection (default)
;n - use count recycle db2 persistent connection
;ibm_db2.i5_check_pconnect=[0,1]
;0 - normal no-check db2 persistent connection (default)
;1 - get conn attribute test
;2 - get conn meta test
;3 - create stmt test
;4 - exec/fetch test
;ibm_db2.i5_sys_naming=[0,1]
;0 - sql naming, schema.table (default)
;1 - system naming, *libl/file
;ibm_db2.i5_guard_profile=[0;1]
;0 - normal no monitor use db2 connection (default)
;1 - before use, assure connect profile correct
;ibm_db2.i5_servermode_subsystem=[null,'name']
; > crtlib adc
; > CRTSBSD SBSD(ADC/ADC) POOLS((1 *BASE)) TEXT('tony subsystem descr')
; > CRTJOBD JOBD(ADC/ADC) TEXT('tony job descr')
; > CRTCLS CLS(ADC/ADC) TEXT('tony class')
; > ADDPJE SBSD(ADC/ADC) PGM(QSYS/QSQSRVR) MAXJOBS(*NOMAX)
; > strsbs adc/adc
;null - normal default susbsystem QSQSRVR jobs (default)
;'name' - named subsystem QSQSRVR jobs prestart
|
1.9.7-sg4 (02–24–2015)
(test only)
|
- NEW: LUW remote to IBM i added IBM i attributes (avail DB2 Connect 10.5+)
require_once('connection.inc');
$all = array();
$conn1 = db2_connect($database, $user, $password,
array(
'i5_naming'=>DB2_I5_NAMING_ON,
'i5_libl'=>"$user",
'i5_curlib'=>"$user"
)
);
if (!$conn1) die("connect\n".db2_stmt_errormsg()."\n");
//Drop the dateme table, in case it exists
$drop = "DROP TABLE DATEME";
$res = @db2_exec($conn1, $drop);
echo "drop\n".db2_stmt_errormsg()."\n";
// Create the dateme table
$create = "CREATE TABLE DATEME (ID DECIMAL(7, 2), col1 DATE DEFAULT CURRENT DATE, col2 TIME DEFAULT CURRENT TIME)";
$res = db2_exec($conn1, $create);
if (!$res) die("create\n".db2_stmt_errormsg()."\n");
//Populate the dateme table
$insert = "INSERT INTO DATEME (ID) values(?)";
$sth = db2_prepare($conn1, $insert);
if (!$sth) die("prepare\n".db2_stmt_errormsg()."\n");
for($i=0;$i<9;$i++){
$res = db2_execute($sth, array(10000 + $i+(.11*$i)));
if (!$res) die("execute insert\n".db2_stmt_errormsg()."\n");
}
$stmt = db2_exec( $conn1, "SELECT ID,col1,col2 FROM DATEME" );
if (!$stmt) die("stmt\n".db2_stmt_errormsg()."\n");
while ($row = db2_fetch_array($stmt)) {
// var_dump($row);
$all[0][]=implode(" ",$row);
}
$conn2 = db2_connect($database, $user, $password,
array(
'i5_naming'=>DB2_I5_NAMING_ON,
'i5_libl'=>"$user",
'i5_curlib'=>"$user",
'i5_date_fmt'=>DB2_I5_FMT_DMY,
'i5_date_sep'=>DB2_I5_SEP_SLASH,
'i5_time_fmt'=>DB2_I5_FMT_HMS,
'i5_time_sep'=>DB2_I5_SEP_BLANK
)
);
if (!$conn2) die("connect\n".db2_stmt_errormsg()."\n");
$stmt = db2_exec( $conn2, "SELECT ID,col1,col2 FROM DATEME" );
if (!$stmt) die("stmt\n".db2_stmt_errormsg()."\n");
while ($row = db2_fetch_array($stmt)) {
// var_dump($row);
$all[1][]=implode(" ",$row);
}
$conn3 = db2_connect($database, $user, $password,
array(
'i5_naming'=>DB2_I5_NAMING_ON,
'i5_libl'=>"$user",
'i5_curlib'=>"$user",
'i5_date_fmt'=>DB2_I5_FMT_EUR,
'i5_time_fmt'=>DB2_I5_FMT_USA
)
);
if (!$conn3) die("connect\n".db2_stmt_errormsg()."\n");
$stmt = db2_exec( $conn3, "SELECT ID,col1,col2 FROM DATEME" );
if (!$stmt) die("stmt\n".db2_stmt_errormsg()."\n");
while ($row = db2_fetch_array($stmt)) {
// var_dump($row);
$all[2][]=implode(" ",$row);
}
for ($i=0;$i<9;$i++) {
if ($all[0][$i] == $all[1][$i]) {
die("fail {$all[0][$i]} {$all[1][$i]}\n");
}
if ($all[0][$i] == $all[2][$i]) {
die("fail {$all[0][$i]} {$all[2][$i]}\n");
}
if ($all[1][$i] == $all[2][$i]) {
die("fail {$all[0][$i]} {$all[1][$i]}\n");
}
echo("good {$all[0][$i]} {$all[1][$i]} {$all[2][$i]}\n");
}
echo "success\n";
?>
|
1.9.7-sg2 (02–23–2015)
(test only)
|
- NEW: LUW remote to IBM i allow system naming (‘i5_naming’=>DB2_I5_NAMING_ON, ‘i5_libl’=>”QTEMP DB2″, ‘i5_curlib’=>’DB2′)
require_once('connection.inc');
$conn1 = db2_connect($database, $user, $password, array('i5_naming'=>DB2_I5_NAMING_ON, 'i5_libl'=>"QTEMP DB2", 'i5_curlib'=>'DB2'));
// $conn1 = db2_connect($database, $user, $password);
echo "connect\n".db2_stmt_errormsg()."\n";
$stmt = db2_exec( $conn1, "SELECT * FROM $user/animals ORDER BY breed" );
echo "stmt\n".db2_stmt_errormsg()."\n";
while ($row = db2_fetch_array($stmt)) {
echo "fetch\n".db2_stmt_errormsg()."\n";
var_dump($row);
}
- NEW: LUW remote to IBM i allow isolation *NONE for CRTLIB no journal (‘i5_commit’=>DB2_I5_TXN_NO_COMMIT)
<?php
require_once('connection.inc');
/*
========
db2 connect 10.5+
db2inst2 -> linux install db2 connect instance
lp0364d -> IBM i
========
>su db2inst2
>db2
db2 => catalog tcpip node LP0364D remote lp0364d.rch.stglabs.ibm.com server 446
db2 => catalog db LP0364D at node LP0364D authentication dcs
db2 => catalog dcs db LP0364D as LP0364D
db2 => terminate
Note: "LP0364D" - can be found using WRKRDBDIRE (local RDB name / database name)
ERROR: if you see SQL0805N Package "NULLID.SYSSH000" was not found
>su db2inst2
$ db2
db2 => connect to lp0364d user db2 using xxxxx
db2 => bind "/opt/ibm/db2/V10.5/bnd/@db2cli.lst" blocking all grant public
db2 => terminate
*/
// DB2_I5_TXN_READ_UNCOMMITTED DB2_I5_TXN_NO_COMMIT
$conn = db2_connect($database, $user, $password, array('i5_commit'=>DB2_I5_TXN_NO_COMMIT));
echo "connect\n".db2_stmt_errormsg()."\n";
//Drop the animal table, in case it exists
$drop = "DROP TABLE DB2NONE.ANIMALS";
$res = @db2_exec($conn, $drop);
echo "drop\n".db2_stmt_errormsg()."\n";
//Create the animal table
$create = "CREATE TABLE DB2NONE.ANIMALS (ID INTEGER, BREED VARCHAR(32), NAME CHAR(16), WEIGHT DECIMAL(7,2))";
$res = db2_exec($conn, $create);
echo "create\n".db2_stmt_errormsg()."\n";
//Populate the animal table
$pets = array(
array(0, 'cat', 'Pook', 3.2),
array(1, 'dog', 'Peaches', 12.3),
array(2, 'horse', 'Smarty', 350.0),
array(3, 'gold fish', 'Bubbles', 0.1),
array(4, 'budgerigar', 'Gizmo', 0.2),
array(5, 'goat', 'Rickety Ride', 9.7),
array(6, 'llama', 'Sweater', 150)
);
$insert = "INSERT INTO DB2NONE.ANIMALS (ID, BREED, NAME, WEIGHT) VALUES (?,?,?,?)";
$sth = db2_prepare($conn, $insert);
echo "prepare\n".db2_stmt_errormsg()."\n";
if($sth){
foreach($pets as $pet){
$res = db2_execute($sth, $pet);
echo "execute insert\n".db2_stmt_errormsg()."\n";
}
}
?>
|
1.9.7-sg1 (02–20–2015)
(test only)
|
- REMOVED: ibm_db2.i5_db400_ptf=0 in favour of default i5_override_ccsid=1208 (1.9.7 change)
- default i5_override_ccsid=1208 much better conversions direct DB2
- default i5_override_ccsid=1208 by-passes iconv error in libdb400.a
- NEW: prepare list for pecl update (adoption 1.9.6-sg25)
ibm_db2.i5_allow_commit=n
0 - DB2_I5_TXN_NO_COMMIT - Commitment control is not used (no journal)
1 - DB2_I5_TXN_READ_UNCOMMITTED - Dirty reads.
2 - DB2_I5_TXN_READ_COMMITTED - Dirty reads are not possible.
3 - DB2_I5_TXN_REPEATABLE_READ - Dirty reads and nonrepeatable reads are not possible.
4 - DB2_I5_TXN_SERIALIZABLE - Dirty reads, non-repeatable reads, and phantoms are not possible
ibm_db2.i5_dbcs_alloc
0 - normal allocations
1 - expanded allocations for conversion
ibm_db2.i5_all_pconnect
0 - normal db2_connect
1 - force db2_connect to db2_pconnect
ibm_db2.i5_ignore_userid
0 - normal user/pwd (QSQSRVR)
1 - force ignore user/pwd (when possible, no QSQSRVR)
ibm_db2.i5_job_sort
0 - normal sort order
1 - profile sort order
ibm_db2.i5_override_ccsid
1208 - default ccsid (new 1.9.7)
!0 - other pase ccsid
ibm_db2.i5_blank_userid
0 - normal no blank user/pwd db2 connect
1 - allow blank user/pwd db2 connect
ibm_db2.i5_log_verbose
0 - normal php.log message
1 - expanded php.log messages
ibm_db2.i5_max_pconnect
0 - normal nomax db2 persistent connection
!0 - use count recycle db2 persistent connection
ibm_db2.i5_check_pconnect
0 - normal no-check db2 persistent connection
1 - get conn attribute test
2 - get conn meta test
3 - create stmt test
4 - exec/fetch test
ibm_db2.i5_sys_naming
0 - sql naming (schema.table)
1 - system naming (*libl/file)
ibm_db2.i5_servermode_subsystem
null - normal default susbsystem QSQSRVR jobs
'name' - named subsystem QSQSRVR jobs (prestart)
ibm_db2.i5_guard_profile
0 - normal no monitor use db2 connection
1 - before use, assure connect profile (switch user monitor)
|
1.9.6-sg25 (06–05–2014)
(test only)
|
|
1.9.6-sg24 (06–03–2014)
(test only)
|
- FIX: missing i5_dbcs_alloc turned on allocation by mistake (ibm_db2.i5_dbcs_alloc=0)
Variety of VARCHAR, CLOB, CHAR "size or pad" errors occur ...
003- "column 2" from VARCHAR is 8 bytes long, "Data in the clob 2" from CLOB is 18 bytes long.
003+ "column 2" from VARCHAR is 8 bytes long, "Data in the clob2 " from CLOB is 108 bytes long.
|
1.9.6-sg23 (06–03–2014)
(test only)
|
- NEW: override ccsid (ibm_db2.i5_override_ccsid=1208)
/usr/local/zendsvr6/etc/conf.d/ibm_db2.ini
extension=ibm_db2.so
; Commitment control
; 0 - DB2_I5_TXN_NO_COMMIT (0=no commit, works CRTLIB no journal containers)
; 1 - enable default commit setting (DB2 default)
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; array('i5_commit'=>DB2_I5_TXN_NO_COMMIT, ...)
ibm_db2.i5_allow_commit=1
; *NEW force PASE CCSID (utf-8 1208)
; 0 - default PASE CCSID
; 1208 - force utf-8 PASE CCSID (better DB2 operations)
; n - other PASE CCSIDS possible (not tested)
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; none
ibm_db2.i5_override_ccsid=1208
; *NEW System naming mode (also work LUW Db2 Conect V10.5)
; 0 - default SQL naming (schema.table ... libl ignored)
; 1 - IBM i system naming (lib/file ... libl / curlib works)
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; array('i5_naming'=>DB2_I5_NAMING_OFF,'i5_lib'=>'MYLIB')
; array('i5_naming'=>DB2_I5_NAMING_ON,'i5_libl'=>'QTEMP MYLIB','i5_curlib'=>'MYLIB')
ibm_db2.i5_sys_naming=0
; *NEW start server mode jobs to subsystem (QSQ jobs)
; > crtlib adc
; > CRTSBSD SBSD(ADC/ADC) POOLS((1 *BASE)) TEXT('tony subsystem descr')
; > CRTJOBD JOBD(ADC/ADC) TEXT('tony job descr')
; > CRTCLS CLS(ADC/ADC) TEXT('tony class')
; > ADDPJE SBSD(ADC/ADC) PGM(QSYS/QSQSRVR) MAXJOBS(*NOMAX)
; > strsbs adc/adc
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; array('i5_subsystem' => 'adc')
ibm_db2.i5_servermode_subsystem=ADC
; *NEW Advanced db2_pconnect monitor (DB2 pconnect maid service, 1-4 tests)
; 4 - try conn new statement (check statement)
; 3 - try allocate new statement (check allocate)
; 2 - try conn get info (check meta data)
; 1 - try conn get an attribute (check attribute)
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; none
ibm_db2.i5_check_pconnect=1
; *NEW Job profile sort order
; 0 - default DB2 sort order
; 1 - job sort order
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; array('i5_job_sort'=>DB2_I5_JOB_SORT_ON,DB2_I5_JOB_SORT_OFF)
ibm_db2.i5_job_sort=0
; Ignore userid/password db2_connect(null) (no QSQ jobs if exclusive use)
; 0 - default QSQSRVR jobs matching db2_connect(db,user,password)
; 1 - force db2_connect(db,null,null), if site wide exclusive, no QSQSRVR jobs
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; none
ibm_db2.i5_ignore_userid=0
; DBCS extended 6x memory allocations conversions
; 0 - default allocations
; 1 - 6x allocations for larger ascii<>ebcdic character conversions
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; array('i5_dbcs_alloc'=>DB2_I5_DBCS_ALLOC_ON)
ibm_db2.i5_dbcs_alloc=0
; Force db2_connect to db2_pconnect (no change script)
; 0 - default script db2_connect
; 1 - override db2_connect to db2_pconnect
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; none
ibm_db2.i5_all_pconnect=0
; *NEW Max use count db2_pconnect to recycle
; 0 - default db2_pconnect unlimited use persistent connection
; n - recycle db2_pconnect persistent connection at count usage
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; none
ibm_db2.i5_max_pconnect=0
; *NEW Allow blank userid/password (security change over prior releases)
; 0 - default restrict blank userid/password
; enforcing IBM i latest PTF policy no blank passwords
; 1 - allow blank userid/password
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : do not use
; program override
; none
ibm_db2.i5_blank_userid=1
; *NEW DB2 error log verbose (SQL errors var/logs/php.log)
; 0 - default log behavior original design (production)
; 1 - additional log information, SQL errors, etc (debug)
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; none
ibm_db2.i5_log_verbose=0
; *NEW Guard profile (switch back profile xmlservice clients)
; 0 - default no monitor of QSQSRVR job profile active
; 1 - monitor QSQSRVR job profile, return to original if changed
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; none
ibm_db2.i5_guard_profile=1
; *NEW XMLSERVICE install library (use with guard profile)
; library - install library of XMSLERVICE
; for use with i5_guard_profile
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; none
ibm_db2.i5_xmlservice_install=ZENDSVR
; *NEW workaround attribute conversion (PASE libdb400.a bug)
; 0 - default workaround enabled
; 1 - workaround no longer needed
; Following attributes not work (unless PASE 1208 CCSID),
; libdb400.a will require a PTF to fix, workaround use i5_db400_ptf=0
; (default if missing)
; SQL_ATTR_SERVERMODE_SUBSYSTEM array('i5_subsystem' => 'adc')
; SQL_ATTR_INFO_USERID array('userid' => 'db2inst1');
; SQL_ATTR_INFO_ACCTSTR array('acctstr' => 'account')
; SQL_ATTR_INFO_APPLNAME array('applname' => 'myapp')
; SQL_ATTR_INFO_WRKSTNNAME array('wrkstnname' => 'workstation')
; platforms
; IBM i (PASE): enabled
; LUW-2-IBM i : enabled
; program override
; none
ibm_db2.i5_db400_ptf=0
|
1.9.6-sg22 (06–02–2014)
(test only)
|
- NEW: set subsystem on connection (ibm_db2.i5_servermode_subsystem=ADC)
$options1 = array('i5_subsystem' => 'adc');
$conn = db2_connect($database, $user, $password, $options1);
- FIX: Conversion issues with libdb400.a new attributes (see i5_db400_ptf=0)
Following attributes did not work, libdb400.a will require a PTF to fix,
workaround use i5_db400_ptf=0 in the ibm_db2.ini (default if missing)
SQL_ATTR_SERVERMODE_SUBSYSTEM array('i5_subsystem' => 'adc')
SQL_ATTR_INFO_USERID array('userid' => 'db2inst1');
SQL_ATTR_INFO_ACCTSTR array('acctstr' => 'account')
SQL_ATTR_INFO_APPLNAME array('applname' => 'myapp')
SQL_ATTR_INFO_WRKSTNNAME array('wrkstnname' => 'workstation')
- NEW: i5_db400_ptf=0,1 for issues with libdb400.a new attributes
/usr/local/zendsvr6/etc/conf.d/ibm_db2.ini
extension=ibm_db2.so
ibm_db2.i5_dbcs_alloc=0 NA
ibm_db2.i5_all_pconnect=0 NA
ibm_db2.i5_max_pconnect=0 NA
ibm_db2.i5_check_pconnect=1 NA
ibm_db2.i5_ignore_userid=0 NA
ibm_db2.i5_blank_userid=1 NA
ibm_db2.i5_guard_profile=0 NA
ibm_db2.i5_xmlservice_install=XMLSERVICE NA
ibm_db2.i5_log_verbose=1 NA
ibm_db2.i5_db400_ptf=0 NA
ibm_db2.i5_servermode_subsystem=ADC array('i5_subsystem' => 'adc')
ibm_db2.i5_job_sort=0 array('i5_job_sort'=>DB2_I5_JOB_SORT_ON,DB2_I5_JOB_SORT_OFF)
ibm_db2.i5_allow_commit=1 array('i5_commit'=>DB2_I5_TXN_NO_COMMIT, ...)
ibm_db2.i5_sys_naming=0 array('i5_naming'=>DB2_I5_NAMING_ON,DB2_I5_NAMING_OFF)
array('i5_naming'=>DB2_I5_NAMING_OFF,'i5_lib'=>'MYLIB')
array('i5_naming'=>DB2_I5_NAMING_ON,'i5_libl'=>'QTEMP MYLIB','i5_curlib'=>'MYLIB')
- Reminder creating a subsystem for QSQSRVR jobs
> crtlib adc
> CRTSBSD SBSD(ADC/ADC) POOLS((1 *BASE)) TEXT('tony subsystem descr')
> CRTJOBD JOBD(ADC/ADC) TEXT('tony job descr')
> CRTCLS CLS(ADC/ADC) TEXT('tony class')
> ADDPJE SBSD(ADC/ADC) PGM(QSYS/QSQSRVR) MAXJOBS(*NOMAX)
> strsbs adc/adc
|
1.9.6-sg21 (05–29–2014)
(test only)
|
|
1.9.6-sg19 (05–27–2014)
(test only)
|
- FIX: DB2 connect uncatalog
- FIX: issue with BIGINT junk suffix
- NEW: re-factor all tests/*.phpt both IBM i PASE (native) and LUW to IBM i (10.5 DB2 Connect)
|
1.9.6-sg15 (03–21–2014)
(test only)
|
|
1.9.6-sg14 (02–18–2014)
(test only)
|
|
1.9.6-sg13 (02–12–2014)
(test only)
|
- FIX: added sqlstate
ibm_db2.i5_log_verbose=1 (Alan)
- FIX: restore default CRTLIB containers
ibm_db2.i5_allow_commit=0 (Luca)
- FIX: call RPG stored procedures require padding PHP variable (eaburk)
<?php
/* http://forums.zend.com/viewtopic.php?f=77&t=115183 */
require "connection.inc";
$conn = db2_connect($db,$uid,$pwd);
$sql = "call XMLSERVICE.ZZ243P(?,?)";
$stmt = db2_prepare($conn, $sql);
$key=0; // $key = '000000000';
$errors="";
db2_bind_param($stmt,1,"key",DB2_PARAM_INOUT);
db2_bind_param($stmt,2,"errors",DB2_PARAM_INOUT);
if (db2_execute($stmt)) {
echo $errors;
}
else {
echo db2_stmt_errormsg();
}
?>
|
1.9.6-sg12 (01–22–2014)
(test only)
|
- NEW: new options control ibm_db2 IBM i, including remote support IBM i (LUW 10.5 → IBM i)
etc/conf.d/ibm_db2.ini
extension=ibm_db2.so
ibm_db2.i5_dbcs_alloc=0,1 - DBCS extended memory allocations (6x conversions DB2)
ibm_db2.i5_all_pconnect=0,1 - Force db2_connect to db2_pconnect (no change script)
ibm_db2.i5_allow_commit=0,1 - Commitment control (0=works CRTLIB containers, but restricted function)
ibm_db2.i5_ignore_userid=0,1 - Ignore userid/password db2_connect(null) (no QSQ jobs)
ibm_db2.i5_all_connect=0,1 - *NEW Force db2_pconnect to db2_connect (no QSQ jobs)
ibm_db2.i5_max_pconnect=0-n - *NEW Max use count db2_pconnect to recycle
ibm_db2.i5_check_pconnect=0-4 - *NEW Advanced db2_pconnect monitor (DB2 pconnect maid service, 1-4 tests)
ibm_db2.i5_job_sort=0,1 - *NEW Job profile sort order
ibm_db2.i5_sys_naming=0,1 - *NEW System naming mode (also work LUW Db2 Conect V10.5)
ibm_db2.i5_blank_userid=0,1 - *NEW Allow blank userid/password (security change over prior releases)
ibm_db2.i5_guard_profile=0,1 - *NEW Guard profile (switch back profile xmlservice clients)
ibm_db2.i5_xmlservice_install=XMLSERVICE - *NEW XMLSERVICE install library
ibm_db2.i5_xmlservice_log=0,1 - *NEW XMLSERVICE log enable (use with db2_ibmi_xmlservice)
ibm_db2.i5_xmlservice_log_file=/path/xmlservice.log - *NEW XMLSERVICE log file (use with db2_ibmi_xmlservice)
ibm_db2.i5_xmlservice_log_size=0-n - *NEW XMLSERVICE log file max size (use with db2_ibmi_xmlservice)
ibm_db2.i5_log_verbose=0,1 - *NEW DB2 error log verbose (see SQL errors var/logs/php.log)
ibm_db2.i5_servermode_subsystem=QSYSWRK - *NEW V7(PTF)+ move server mode jobs to subsystem (QSQ jobs)
*Note:
No QSQ jobs only works if php-cli process never enters server mode.
In practice, ibm_db2.ini set i5_ignore_userid or i5_all_connect,
but you can ONLY use ibm_db2 on the site, never mix pdo_ibm/odbc.
- NEW: new built in xmlservice call, including remote support IBM i (LUW 10.5 → IBM i)
string db2_ibmi_xmlservice(resource connection, string xmlin, [ int xmlout_len, string ctl, string ipc ])
$conn = db2_connect($database,$user,$password);
$clobIn = getxml();
$clobOut = db2_ibmi_xmlservice($conn,$clobIn);
function getxml() {
$clob = <<<ENDPROC
<?xml version='1.0'?>
<script>
<pgm name='ZZCALL' lib='XMLSERVICE'>
<parm io='both'>
<data type='1A' var='INCHARA'>a</data>
</parm>
:
- INTERNAL: remove nearly all
#ifdef PASE and h files for luw, pase and common
/* ==============================
* php_ibm_db2.h - COMMON platform (PASE and LUW)
* php_sql_luw.h - LUW #define ordinals
* php_sql_pase.h - PASE #define ordinals
* ==============================
* Goal: Fewer ifdefs in run code, by using header file(s).
*
* Story of php_sql_luw.h and php_sql_pase.h ...
* PASE/LUW section attributes MAY be missing depending "older" version DB2 product (DB2 Connect, etc.)
* Idea is we know about them, so at runtime we can choose to make choices on older releases,
* perhaps we will not have to hamper good customers running our/IBM current releases.
* ...
* Consolidate pointer vs. value set attribute issue IBM i vs. LUW.
* to avoid the whole ifdef mess in ibm_db2.c
* ...
* Where case ordinals (#define) cause duplicate switch case:,
* use a MISSING ordinal to avoid the whole ifdef mess in ibm_db2.c
* ...
* Compile on "old" release and move to "modern" system, same binary will work
* but with additional funtions not supported on "old" release.
* ...
* Allows Zend to compile "one" Zend Server ibm_db2 that works
* forward compatible with many "future" IBM/Zend drivers (PASE and LUW)
* ...
* For issues above see generic workaround helper function (ibm_db2.c)
* _php_db2_special_return
* _php_db2_SQLSetStmtAttr
* _php_db2_SQLSetConnectAttr
* _php_db2_SQLSetEnvAttr
* _php_db2_SQLGetInfo
* ...
* The original ibm_db.c code used global variables is_ios, is_zos, etc.,
* this mostly worked (usually only one connection active),
* but not when using multiple connections to multiple target DB2's
* (different platforms, different releases, etc.)
* so values have been moved into connection structure.
* typedef struct _conn_handle_struct {
* :
* int flag_is; CONNECT_IS_LUW, CONNECT_IS_IBMI, CONNECT_IS_ZIOS
* int flag_lvl; CONNECT_IS_LUW_CLASSIC, CONNECT_IS_IBMI_V5R4, ...
* } conn_handle;
*/
|