Re: problem in creating the ibm_db2 extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



H Thirividi wrote:
> 
> 
> On Thu, May 1, 2008 at 5:53 AM, Chris <dmagick@xxxxxxxxx
> <mailto:dmagick@xxxxxxxxx>> wrote:
> 
>     H Thirividi wrote:
>     > Hi All,
>     >
>     > I have installed db2 on my* fedora core 7* system and now i wan t
>     to access
>     > the database using the* php apis*. For this reason I downloaded
>     the *ibm_db2
>     > 1.6* package and tried to create the extension. I did the following
>     >
>     > phpize
>     >
>     > output is
>     > Configuring for:
>     > PHP Api Version:         20041225
>     > Zend Module Api No:      20060613
>     > Zend Extension Api No:   220060519
>     >
>     > ./configure --with-IBM_DB2=/opt/ibm/db2/V9.5
>     > part of the ouput
>     >
>     > checking for re2c... no
>     > configure: WARNING: You will need re2c 0.12.0 or later if you want to
>     > regenerate PHP parsers.
>     > checking for gawk... gawk
>     > checking for IBM_DB2 support... yes, shared
>     > checking Looking for DB2 CLI libraries... checking      in
>     > /opt/ibm/db2/V9.5...
>     > checking      in /opt/ibm/db2/V9.5/lib64...
>     > checking      in /opt/ibm/db2/V9.5/lib32... found
>     > checking for DB2 CLI include files in default path... checking in
>     > /opt/ibm/db2/V9.5... not found
> 
>     It's looking for the include/, lib/ etc folders under that (ie the
>     headers and so on).
> 
>     Where are they located?
> 
> Hello Chris,
> 
> I am not sure if after getting a reply to the question one should still
> reply to the mailing list or reply to the *person directly*. If I have
> committed a mistake kindly oblige as this is new to me.

mailing list - so others can chime in with suggestions and/or learn from
the questions/comments.

> After posting the question I just *searched* and then came to know that
> while installing db2, it had created 3 users named *db2inst1*,
> *db2fenc1* and one more *administrative user* whose name i am not able
> to recollect and then saw *db2 cli include files* in *db2inst1's home*
> when i logged onto the system as a db2inst1 user and tried to copy those
> files to /opt/ibm/db2/V9.5 (which is where db2 database is installed) 
> but  gave me an error saying that I cannot copy.

Note - I have never installed db2 so not sure how it works/is set up.

However, with mysql, postgresql, gd & other extensions for php, you have
to install the "devel" or "dev" package along with the main one for php
to compile against.

The "dev" package provides the headers which other packages can use, for
example:

/usr/include/postgresql/*.h
/usr/lib/postgresql/*

PHP looks at those headers (*.h) and uses those to work out functionality.

So when you compile, you have to point php to the base folder which
contains the include/ and lib/ subdirectories.

./configure --with-pgsql=/usr

in your case:

./configure --with-db2=/path/to/db2

under /path/to/db2 you need the include/, lib/ etc folders which include
the program headers. Without those files, php won't compile with db2
support.


It looks like you have the lib stuff there (lib32/ is fine, it was
picked up) but there's no include/ stuff which is what configure is
complaining about.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux