php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57354 Configure error caused by IBM extension
Submitted: 2006-11-07 11:29 UTC Modified: 2006-11-08 11:19 UTC
From: brent dot halsey at huntington dot com Assigned: kfbombar (profile)
Status: Closed Package: ibm_db2 (PECL)
PHP Version: 5.1.4 OS: SUSE Enterprise 9
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brent dot halsey at huntington dot com
New email:
PHP Version: OS:

 

 [2006-11-07 11:29 UTC] brent dot halsey at huntington dot com
Description:
------------
I have successfully compiled php with the ibm_db2 extension on a box with the same OS.  I am trying to repeat the install on the production box and am getting an error when I run the configure on php.

Reproduce code:
---------------
I move the ibm_db2 directory to ext/ibm_db2 in the php source directory.  I remove the old configure and run ./buildconf --force from the php source directory.  It gives me some warnings about my autoconf version but completes successfully.  I run my configure statement:
./configure --with-mysql --with-apxs2=/opt/www/bin/apxs --with-IBM_DB2=/opt/IBM/db2/V8.1 --with-pdo-odbc=ibm-db2,/home/db2inst2/sqllib --with-gd=/usr/local --with-zlib=/usr/local --with-png-dir=/usr/local --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/local

Expected result:
----------------
I expect this to build successfully.

Actual result:
--------------
.
.
.
checking for lemon... no
configure: WARNING: lemon versions supported for regeneration of libsqlite parsers: 1.0 (found: none).
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof (char *), 77
See `config.log' for more details.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-07 11:32 UTC] brent dot halsey at huntington dot com
I use db2inst2 because this box had a db2inst1 user already on it.  If I remove the --with-pdo-odbc=ibm-db2,/home/db2inst2/sqllib the configure will complete successfully but it will not install db2 even though it still has the --with-IBM_DB2=/opt/IBM/db2/V8.1
 [2006-11-07 11:39 UTC] kfbombar at us dot ibm dot com
You will have to ask the pdo_odbc project members for that issue specific to pdo_odbc.  

For the IBM_DB2 extension not being built/installed:

Can you provide the details from the configure and make where IBM_DB2 is being done?  Also, did you source the db2profile before the configure?
 [2006-11-07 11:45 UTC] brent dot halsey at huntington dot com
Configure Command used: './configure' '--with-mysql' '--with-apxs2=/opt/www/bin/apxs' '--with-IBM_DB2=/opt/IBM/db2/V8.1' '--with-gd=/usr/local' '--with-zlib=/usr/local' '--with-png-dir=/usr/local' '--with-jpeg-dir=/usr/lib' '--with-freetype-dir=/usr/local' 

I was installing this as a user named webadm.  As that user I ran 'source /home/db2inst2/sqllib/db2profile' prior to running the configure statment.
 [2006-11-07 11:49 UTC] kfbombar at us dot ibm dot com
Can you please provide the details (output, meaning the I/O output from the ./configure and make) of the configure and make where the IBM_DB2 extension is output?
 [2006-11-07 12:00 UTC] brent dot halsey at huntington dot com
My linux admin should be running the config now and piping the output to a file.  I just checked the config.log and found the configure statement we are interested in.  There is no reference of ibm or db2 anywhere excepte for in the configure statment itself.  I'll post the output from the configure as soon as I get it.  Thanks.
 [2006-11-07 15:28 UTC] brent dot halsey at huntington dot com
here is the output from the ./configure statement relative to IBM:
checking for IBM DB2 support... no

Why would that be?
 [2006-11-07 16:41 UTC] kfbombar at us dot ibm dot com
A few questions:

Can you do an "ls -l" in your PHP "ext" directory and if the ibm_db2 directory is in there, can you do a "ls -l" in there?  Also, did you do a ./buildconf --force prior to the configure but after you put the ibm_db2 source directory in the PHP "ext" directory?
 [2006-11-07 16:47 UTC] brent dot halsey at huntington dot com
hb23991@testman:/srv/phpi/php-5.1.4/ext> ls -l
total 31
drwxr-xr-x  4 webadm   1002  280 2006-05-12 10:41 bcmath
drwxr-xr-x  3 webadm   1002  336 2006-05-12 10:41 bz2
drwxr-xr-x  3 webadm   1002  456 2006-05-12 10:41 calendar
drwxr-xr-x  3 webadm   1002  648 2006-05-12 10:40 com_dotnet
drwxr-xr-x  4 webadm   1002  384 2006-11-06 10:59 ctype
drwxr-xr-x  2 webadm   1002  312 2006-05-12 10:41 curl
drwxr-xr-x  5 webadm   1002  328 2006-11-06 10:59 date
drwxr-xr-x  6 webadm   1002 1088 2006-05-12 10:41 dba
drwxr-xr-x  3 webadm   1002  560 2006-05-12 10:41 dbase
drwxr-xr-x  5 webadm   1002 2536 2006-11-06 10:59 dom
drwxr-xr-x  3 webadm   1002  352 2006-05-12 10:41 exif
-rwxr-xr-x  1 webadm   1002 8170 2004-05-16 08:10 ext_skel
-rwxr-xr-x  1 webadm   1002 1579 2003-10-29 00:42 ext_skel_win32.php
drwxr-xr-x  2 webadm   1002  264 2006-05-12 10:41 fbsql
drwxr-xr-x  3 webadm   1002  272 2006-05-12 10:41 fdf
drwxr-xr-x  2 webadm   1002  264 2006-05-12 10:41 filepro
drwxr-xr-x  2 webadm   1002  280 2006-05-12 10:41 ftp
drwxr-xr-x  5 webadm   1002  496 2006-11-06 11:28 gd
drwxr-xr-x  3 webadm   1002  256 2006-05-12 10:41 gettext
drwxr-xr-x  3 webadm   1002  264 2006-05-12 10:41 gmp
drwxr-xr-x  4 webadm   1002 1688 2006-11-06 10:59 hash
drwxr-xr-x  2 webadm   1002  168 2006-05-12 10:41 hwapi
drwxr-xr-x  6 webadm webadm  880 2006-11-07 13:12 ibm_db2
drwxr-xr-x  4 webadm   1002  608 2006-11-06 10:59 iconv
drwxr-xr-x  3 webadm   1002  288 2006-05-12 10:41 imap
drwxr-xr-x  2 webadm   1002  288 2006-05-12 10:41 informix
drwxr-xr-x  3 webadm   1002  488 2006-05-12 10:41 interbase
drwxr-xr-x  2 webadm   1002  280 2006-05-12 10:41 ldap
drwxr-xr-x  3 webadm   1002  280 2006-11-06 10:58 libxml
drwxr-xr-x  5 webadm   1002  616 2006-05-12 10:41 mbstring
drwxr-xr-x  3 webadm   1002  272 2006-05-12 10:41 mcrypt
drwxr-xr-x  3 webadm   1002  248 2006-05-12 10:41 mhash
drwxr-xr-x  2 webadm   1002  384 2006-05-12 10:41 mime_magic
drwxr-xr-x  3 webadm   1002  272 2006-05-12 10:41 ming
drwxr-xr-x  2 webadm   1002  224 2006-05-12 10:41 msql
drwxr-xr-x  2 webadm   1002  272 2006-05-12 10:41 mssql
drwxr-xr-x  4 webadm   1002  376 2006-11-06 10:59 mysql
drwxr-xr-x  3 webadm   1002  672 2006-05-12 10:41 mysqli
drwxr-xr-x  3 webadm   1002  456 2006-05-12 10:41 ncurses
drwxr-xr-x  3 webadm   1002  464 2006-05-12 10:41 oci8
drwxr-xr-x  2 webadm   1002  304 2006-05-12 10:41 odbc
drwxr-xr-x  3 webadm   1002  336 2006-05-12 10:41 openssl
drwxr-xr-x  3 webadm   1002  368 2006-05-12 10:41 pcntl
drwxr-xr-x  5 webadm   1002  336 2006-11-06 10:58 pcre
drwxr-xr-x  4 webadm   1002  840 2006-11-06 10:59 pdo
drwxr-xr-x  2 webadm   1002  384 2006-05-12 10:40 pdo_dblib
drwxr-xr-x  3 webadm   1002  416 2006-05-12 10:41 pdo_firebird
drwxr-xr-x  3 webadm   1002  448 2006-05-12 10:41 pdo_mysql
drwxr-xr-x  3 webadm   1002  392 2006-05-12 10:41 pdo_oci
drwxr-xr-x  4 webadm   1002  512 2006-11-06 11:28 pdo_odbc
drwxr-xr-x  3 webadm   1002  368 2006-05-12 10:41 pdo_pgsql
drwxr-xr-x  4 webadm   1002  456 2006-05-12 10:41 pdo_sqlite
drwxr-xr-x  3 webadm   1002  336 2006-05-12 10:41 pgsql
drwxr-xr-x  3 webadm   1002  240 2006-11-06 10:59 posix
drwxr-xr-x  3 webadm   1002  272 2006-05-12 10:41 pspell
drwxr-xr-x  2 webadm   1002  200 2006-05-12 10:41 readline
drwxr-xr-x  2 webadm   1002  192 2006-05-12 10:41 recode
drwxr-xr-x  4 webadm   1002  288 2006-11-06 10:59 reflection
drwxr-xr-x  4 webadm   1002  616 2006-11-06 10:59 session
drwxr-xr-x  3 webadm   1002  304 2006-05-12 10:41 shmop
drwxr-xr-x  5 webadm   1002  400 2006-11-06 10:59 simplexml
drwxr-xr-x  3 webadm   1002  288 2006-05-12 10:40 skeleton
drwxr-xr-x  2 webadm   1002  248 2006-05-12 10:41 snmp
drwxr-xr-x  4 webadm   1002  784 2006-05-12 10:41 soap
drwxr-xr-x  3 webadm   1002  480 2006-05-12 10:41 sockets
drwxr-xr-x  6 webadm   1002 1240 2006-11-06 11:00 spl
drwxr-xr-x  5 webadm   1002  640 2006-11-06 11:00 sqlite
drwxr-xr-x  4 webadm   1002 5784 2006-11-07 09:37 standard
drwxr-xr-x  2 webadm   1002  168 2006-05-12 10:41 sybase
drwxr-xr-x  3 webadm   1002  256 2006-05-12 10:41 sybase_ct
drwxr-xr-x  3 webadm   1002  224 2006-05-12 10:41 sysvmsg
drwxr-xr-x  3 webadm   1002  224 2006-05-12 10:41 sysvsem
drwxr-xr-x  2 webadm   1002  200 2006-05-12 10:41 sysvshm
drwxr-xr-x  4 webadm   1002  408 2006-05-12 10:41 tidy
drwxr-xr-x  4 webadm   1002  408 2006-11-06 11:01 tokenizer
drwxr-xr-x  3 webadm   1002  280 2006-05-12 10:41 wddx
drwxr-xr-x  4 webadm   1002  408 2006-11-06 11:01 xml
drwxr-xr-x  5 webadm   1002  416 2006-11-06 11:01 xmlreader
drwxr-xr-x  4 webadm   1002  320 2006-05-12 10:41 xmlrpc
drwxr-xr-x  5 webadm   1002  424 2006-11-06 11:01 xmlwriter
drwxr-xr-x  3 webadm   1002  304 2006-05-12 10:41 xsl
drwxr-xr-x  4 webadm   1002  536 2006-11-06 11:28 zlib



hb23991@testman:/srv/phpi/php-5.1.4/ext/ibm_db2> ls -l
total 1333
-rw-r--r--  1 webadm webadm  66376 2006-11-07 09:18 acinclude.m4
-rw-r--r--  1 webadm webadm 287456 2006-11-07 09:18 aclocal.m4
drwxr-xr-x  2 webadm webadm    120 2006-11-07 09:18 autom4te.cache
drwxr-xr-x  2 webadm webadm    176 2006-11-07 09:18 build
-rwxr-xr-x  1 webadm webadm  43499 2006-11-07 09:18 config.guess
-rw-r--r--  1 webadm webadm   1565 2006-11-07 09:18 config.h.in
-rw-r--r--  1 webadm webadm   9297 2006-11-07 13:12 config.log
-rwxr-xr-x  1 webadm webadm   2917 2006-09-08 17:24 config.m4
-rwxr-xr-x  1 webadm webadm     58 2006-11-07 13:12 config.nice
-rwxr-xr-x  1 webadm webadm  31743 2006-11-07 09:18 config.sub
-rwxr-xr-x  1 webadm webadm 457183 2006-11-07 09:18 configure
-rw-r--r--  1 webadm webadm   2691 2006-11-07 09:18 configure.in
-rwxr-xr-x  1 webadm webadm    508 2006-07-11 11:53 config.w32
-rwxr-xr-x  1 webadm webadm 152912 2006-09-08 17:24 ibm_db2.c
-rwxr-xr-x  1 webadm webadm   4687 2005-08-31 07:55 ibm_db2.dsp
drwxr-xr-x  2 webadm webadm     48 2006-11-07 11:45 include
-rw-r--r--  1 webadm webadm      0 2006-11-07 09:18 install-sh
-rw-r--r--  1 webadm webadm 186760 2006-11-07 09:18 ltmain.sh
-rw-r--r--  1 webadm webadm      0 2006-11-07 13:12 Makefile.fragments
-rw-r--r--  1 webadm webadm   4308 2006-11-07 09:18 Makefile.global
-rw-r--r--  1 webadm webadm      0 2006-11-07 13:12 Makefile.objects
-rw-r--r--  1 webadm webadm      0 2006-11-07 09:18 missing
-rw-r--r--  1 webadm webadm      0 2006-11-07 09:18 mkinstalldirs
-rwxr-xr-x  1 webadm webadm   7597 2006-08-30 11:47 php_ibm_db2.h
-rw-r--r--  1 webadm webadm  54636 2006-11-07 09:18 run-tests.php
drwxr-xr-x  2 webadm webadm   4592 2006-11-06 15:18 tests
-rwxr-xr-x  1 webadm webadm     47 2005-06-28 17:17 TODO


There are more files in this ibm_db2 directory than before because I tried compiling this with phpize since the static extension method wasn't working.

I put the "ibm_db2" directory in the "ext" directory prior to running ./buildconf --force.
 [2006-11-07 16:52 UTC] kfbombar at us dot ibm dot com
Well, lets move on the the dynamic creation for ibm_db2.  When you do the following in the ibm_db2 source directory:

phpize
./configure --with-IBM_DB2=/opt/IBM/db2/V8.1
make
make install

What are the output of these commands?
 [2006-11-08 07:38 UTC] brent dot halsey at huntington dot com
My linux admin got back to me and was able to run those commands successfully with no errors.  He said "There were no errors when running these commands."  Should we try to compile php now?
 [2006-11-08 09:41 UTC] kfbombar at us dot ibm dot com
I am confused on what you are saying worked.  If you dynamic creation, compile, and install of the ibm_db2.so module, then include the ibm_db2.so extension in your PHP.ini and do a "php -m" to see if it is included.  Please let us know if this worked so we can close this bug.
 [2006-11-08 10:59 UTC] brent dot halsey at huntington dot com
This appears to have fixed the problem.  I didn't realize that the ibm_db2.so was in the extensions directory.  We added the line to php.ini and the extension works fine.  I am having issues with the acutal db2_connect, but I think that has to do with the ibm_db2.instance_name=db2inst2 line not being in php.ini.  The linux admin should be adding this line and hopefully that will resolve all issues.  I will follow this post up with the results when I get them.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC