|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37018 IBM DB2 problem
Submitted: 2006-04-08 13:12 UTC Modified: 2006-04-08 13:22 UTC
From: ahmet at cemre dot net Assigned:
Status: Not a bug Package: *Database Functions
PHP Version: 5.1.2 OS: Fedora Core release 3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ahmet at cemre dot net
New email:
PHP Version: OS:


 [2006-04-08 13:12 UTC] ahmet at cemre dot net

I'm compiling php 5.1.2 with db2 support but when i try to use db2_* functions, it says "undefined function"

Configure command : 

 ./configure  --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --enable-gd --with-zlib --with-freetype --enable-gd-native-ttf --with-ttf --with-jpeg-dir --with-unixODBC=/usr --with-mssql=/usr/local/freetds --with-openssl --with-ibm-db2=/opt/IBM/db2/V8.1/

[root@www httpdocs]# ldd /usr/local/bin/php  | grep IBM => /opt/IBM/db2/V8.1//lib/ (0xb6fd1000) => /opt/IBM/db2/V8.1/lib/ (0xb6fca000) => /opt/IBM/db2/V8.1/lib/ (0xb6f45000) => /opt/IBM/db2/V8.1/lib/ (0xb6f2d000) => /opt/IBM/db2/V8.1/lib/ (0xb6d12000) => /opt/IBM/db2/V8.1/lib/ (0xb6cca000) => /opt/IBM/db2/V8.1/lib/ (0xb6cbd000) => /opt/IBM/db2/V8.1/lib/ (0xb6c9c000) => /opt/IBM/db2/V8.1/lib/ (0xb6c69000) => /opt/IBM/db2/V8.1/lib/ (0xb6c54000)

[root@www httpdocs]# /usr/local/bin/php -v
PHP 5.1.2 (cli) (built: Apr  8 2006 16:14:22)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
[root@www httpdocs]#

Reproduce code:
$database = 'ASYAWEB';
$user = 'db2inst1';
$password = 'xxx';

$conn = db2_connect($database, $user, $password);

if ($conn) {
   echo "Connection succeeded.";
else {
   echo "Connection failed.";

Expected result:
Connection succeeded

Actual result:
Fatal error: Call to undefined function db2_connect() in /var/www/html/ on line 7


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-08 13:22 UTC]
ibm_db2 is PECL extension and its ./configure option looks like --with-IBM_DB2, not --with-ibm-db2.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jul 11 01:01:26 2020 UTC