php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28719 problem with php-4.3.x and Informix Client SDK 2.81.UC1 UC2 UC3
Submitted: 2004-06-10 03:39 UTC Modified: 2004-08-24 14:52 UTC
From: terry dot bowling at verizon dot com Assigned:
Status: Not a bug Package: Informix related
PHP Version: 4.3.7 OS: Fedora Core 2
Private report: No CVE-ID: None
 [2004-06-10 03:39 UTC] terry dot bowling at verizon dot com
Description:
------------
Cannot successfully compile php-informix when using any of the following Fedora Core 2 srpms:
php-4.3.4-11, php-4.3.6-6, or php-4.3.7-1
As well as the source php-3.4.7 from php.net

I added the " || true" to the makefiles of 4.3.4 and 4.3.6 so they would finish compiling just like 4.3.7 (see recent changelog), but all of them give bad end results.

The only Informix Client SDK's available on IBM's website are 2.81.UC1, 2.81.UC2, and 2.81.UC3.  I tried all three with the same result. 

I set the following env vars:
INFORMIXDIR=/usr/local/informix
LD_LIBRARY_PATH=:/usr/local/informix/lib:/usr/local/informix/lib/esql

I was able to compile perl's DBD::Informix with no problems and I can query and write to my DB, so I think informix sdk is fine.

I add --with-informix=/usr/local/informix to php's SPEC file.  It starts compiling fine, then gives this error:

*******  RPM compile error:
   /usr/bin/ld: cannot find -lphpifx
   collect2: ld returned 1 exit status
   make: *** [sapi/cgi/php] Error 1
   error: Bad exit status from /home/admin/tmp/rpm-tmp.54071 (%build)

***  Strategy 2, forget the whole rpm and just do Informix module  ***

Since I already have php installed, I tried going into the php4.3.x/ext/informix dir to compile this module by itself.  I used the following commands:
phpize
./configure
make

It says it builds completely and without error.
cp modules/informix.so /usr/lib/php4/informix.so
put the appropriate informix.ini in /etc/php.d

then I use the following command to test it:
/home/admin>  php ifxtest.php

ifxtest.php contains the following lines of code:
<?
#ifx_connect(1,2,3);
?>

This script should give an error saying it could not connect to the database because I gave it bogus parameters.  But instead I get:

/home/admin>  php ifxtest.php
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/informix.so' - /usr/local/informix/lib/esql/libifos.so: undefined symbol: ifx_checkAPI in Unknown on line 0
Content-type: text/html
X-Powered-By: PHP/4.3.7

Actual result:
--------------
*******  RPM compile error:
   /usr/bin/ld: cannot find -lphpifx
   collect2: ld returned 1 exit status
   make: *** [sapi/cgi/php] Error 1
   error: Bad exit status from /home/admin/tmp/rpm-tmp.54071 (%build)

*******  php script using /usr/lib/php4/informix.so
/home/admin>  php ifxtest.php
PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/informix.so' - /usr/local/informix/lib/esql/libifos.so: undefined symbol: ifx_checkAPI in Unknown on line 0
Content-type: text/html
X-Powered-By: PHP/4.3.7


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-10 09:03 UTC] derick@php.net
This is a problem with the SPRMS, please file a bug with the Fedora people.
 [2004-08-24 09:33 UTC] r dot epping at meteo dot nl
If it is a problem with SRPMS then why does Debian sarge also have the exact same problem?
 [2004-08-24 14:52 UTC] terry dot bowling at verizon dot com
PHP 4.3.7 seemed to contain a few bug fixes and updates for Informix, but I was never able to get the Fedora SRPM's for any of the 4.3.x versions to compile.  Maybe there _is_ a problem with Fedora's packages.

I worked around the issue by installing the Fedora PHP4.3.7 binaries.  I then downloaded the raw 4.3.7 source code from PHP.  I looked at the compile options that the SRPM's used and I compiled the raw source with the same options, including Informix suppport.  When it was finished, all I had to do was copy the informix.so lib into /usr/lib/php4/.  I also had to configure the /etc/php.ini file and add create /etc/php.d/informix.ini.

I think the informix.so lib was found in either src/php-4.3.7/modules/ or src/php-4.3.7/ext/informix/.  I can't remember which.

Keep in mind that some of these directories and the informix.ini seem to be Fedora/RedHat specific.  Hope this helps someone....
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC