v***@vanhoof.com
2007-09-18 19:51:26 UTC
We have a system running Fedora Core 5 (2.6.18-1.2257.fc5) with Apache/2.2.2 and PHP 5.2.4. DB2 is installed as follows:
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08022"
with level identifier "03030106".
Informational tokens are "DB2 v8.1.2.88", "s050422", "MI00117", and FixPak "9".
Product is installed at "/opt/IBM/db2/V8.FP9".
Per http://us.php.net/ibm_db2 we did the following to install the "real" IBM DB2 driver for PHP:
pecl install ibm_db2
We have tried building this version of PHP with the following commands:
/home/db2inst1/sqllib/db2profile
/configure --with-ibm-db2=/home/db2inst1/sqllib --sysconfdir=/etc
The build test gave these, but I believe them to be non-critical:
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Bug #41655 (open_basedir bypass via glob()) [ext/standard/tests/file/bug41655_1.phpt]
We have added/edited the following in /etc/php.ini:
extension=ibm_db2.so
ibm_db2.instance_name db2inst1
ibm_db2.binmode 1
ibm_db2.i5_allow_commit 0
ibm_db2.i5_dbcs_alloc 0
We wrote a test program (I've not included the Apache details, as Apache is, in fact, processing the PHP correctly):
<?php
$database = 'XXXXX'; # Appropriate DB here
$user = 'db2inst1';
$password = 'xxxxxxxx';# Appropriate pass for db2inst1 here
$conn = db2_connect($database, $user, $password);
if ($conn) {
echo "Connection succeeded.";
db2_close($conn);
}
else {
echo "Connection failed.";
}
?>
But we get: Fatal error: Call to undefined function db2_connect() in /var/www/html/php/db2_test.php on line 6
And in the apache log: PHP Fatal error: Call to undefined function db2_connect() in /var/www/html/php/db2_test.php on line 6
We have Googled this and no one can give a straight answer on what's wrong, here. Can ANYONE shed any light on why this is occurring???
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08022"
with level identifier "03030106".
Informational tokens are "DB2 v8.1.2.88", "s050422", "MI00117", and FixPak "9".
Product is installed at "/opt/IBM/db2/V8.FP9".
Per http://us.php.net/ibm_db2 we did the following to install the "real" IBM DB2 driver for PHP:
pecl install ibm_db2
We have tried building this version of PHP with the following commands:
/home/db2inst1/sqllib/db2profile
/configure --with-ibm-db2=/home/db2inst1/sqllib --sysconfdir=/etc
The build test gave these, but I believe them to be non-critical:
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Bug #41655 (open_basedir bypass via glob()) [ext/standard/tests/file/bug41655_1.phpt]
We have added/edited the following in /etc/php.ini:
extension=ibm_db2.so
ibm_db2.instance_name db2inst1
ibm_db2.binmode 1
ibm_db2.i5_allow_commit 0
ibm_db2.i5_dbcs_alloc 0
We wrote a test program (I've not included the Apache details, as Apache is, in fact, processing the PHP correctly):
<?php
$database = 'XXXXX'; # Appropriate DB here
$user = 'db2inst1';
$password = 'xxxxxxxx';# Appropriate pass for db2inst1 here
$conn = db2_connect($database, $user, $password);
if ($conn) {
echo "Connection succeeded.";
db2_close($conn);
}
else {
echo "Connection failed.";
}
?>
But we get: Fatal error: Call to undefined function db2_connect() in /var/www/html/php/db2_test.php on line 6
And in the apache log: PHP Fatal error: Call to undefined function db2_connect() in /var/www/html/php/db2_test.php on line 6
We have Googled this and no one can give a straight answer on what's wrong, here. Can ANYONE shed any light on why this is occurring???