php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ahmet at cemre dot net
New email:
PHP Version: OS:

 

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

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
        libdb2.so.1 => /opt/IBM/db2/V8.1//lib/libdb2.so.1 (0xb6fd1000)
        libdb2install.so.1 => /opt/IBM/db2/V8.1/lib/libdb2install.so.1 (0xb6fca000)
        libdb2g11n.so.1 => /opt/IBM/db2/V8.1/lib/libdb2g11n.so.1 (0xb6f45000)
        libdb2locale.so.1 => /opt/IBM/db2/V8.1/lib/libdb2locale.so.1 (0xb6f2d000)
        libdb2osse.so.1 => /opt/IBM/db2/V8.1/lib/libdb2osse.so.1 (0xb6d12000)
        libdb2genreg.so.1 => /opt/IBM/db2/V8.1/lib/libdb2genreg.so.1 (0xb6cca000)
        libdb2trcapi.so.1 => /opt/IBM/db2/V8.1/lib/libdb2trcapi.so.1 (0xb6cbd000)
        libdb2dascmn.so.1 => /opt/IBM/db2/V8.1/lib/libdb2dascmn.so.1 (0xb6c9c000)
        libcxa.so.3 => /opt/IBM/db2/V8.1/lib/libcxa.so.3 (0xb6c69000)
        libdb2osse_db2.so.1 => /opt/IBM/db2/V8.1/lib/libdb2osse_db2.so.1 (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.";
   db2_close($conn);
}
else {
   echo "Connection failed.";
}


Expected result:
----------------
Connection succeeded


Actual result:
--------------
Fatal error: Call to undefined function db2_connect() in /var/www/html/turkyayin.com/httpdocs/deneme.php on line 7

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-08 13:22 UTC] tony2001@php.net
ibm_db2 is PECL extension and its ./configure option looks like --with-IBM_DB2, not --with-ibm-db2.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 00:01:27 2025 UTC