php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39516 Unable to load dynamic library '/usr/lib/php/modules/informix.so'
Submitted: 2006-11-14 22:42 UTC Modified: 2006-11-21 14:50 UTC
From: ggmensajes at yahoo dot es Assigned:
Status: Not a bug Package: Informix related
PHP Version: 5.2.0 OS: Linux Fedora Core 5
Private report: No CVE-ID: None
 [2006-11-14 22:42 UTC] ggmensajes at yahoo dot es
Description:
------------
1) There is no script executed yet.  Error was triggered at startup

2) ./configure --with-informix=shared,/opt/informix

3) Procedure:

- Generated module produced after make command (informix.so) was copied into /usr/lib/php/modules
- An informix.ini file was created in /etc/php.d

4) Apache reinitialized (with informix environment vars included) and there was no informix connection available


Expected result:
----------------
Informix connection available

Actual result:
--------------
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/informix.so' - /opt/informix/lib/esql/libifos.so: undefined symbol: ifx_checkAPI in Unknown on line 0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-14 22:48 UTC] tony2001@php.net
Plese make sure ld knows where to look for the Informix libs:
ldd /usr/lib/php/modules/informix.so

 [2006-11-15 19:47 UTC] ggmensajes at yahoo dot es
This is the ldd result:

linux-gate.so.1 =>  (0x00a24000)
libifsql.so => /opt/informix/lib/esql/libifsql.so 0x00cbe000)
libifasf.so => /opt/informix/lib/libifasf.so (0x0098e000)
libifgen.so => /opt/informix/lib/esql/libifgen.so (0x00faa000)
libthcli.so => /opt/informix/lib/esql/libthcli.so (0x00d86000)
libifos.so => /opt/informix/lib/esql/libifos.so (0x00196000)
libifgls.so => /opt/informix/lib/esql/libifgls.so (0x00c7a000)
libdl.so.2 => /lib/libdl.so.2 (0x00aed000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0072a000)
libifglx.so => /opt/informix/lib/esql/libifglx.so (0x00a67000)
libc.so.6 => /lib/libc.so.6 (0x003e9000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00164000)
libm.so.6 => /lib/libm.so.6 (0x00111000)
/lib/ld-linux.so.2 (0x009ce000)


Actually libifos.so is in /opt/informix/lib/esql directory

My installed Informix csdk version is:

csdk-2.90.UC4-1


Thanks
 [2006-11-15 19:56 UTC] tony2001@php.net
And `ldconfig -p | grep informix`, please.
 [2006-11-16 15:01 UTC] ggmensajes at yahoo dot es
This is the `ldconfig -p | grep informix` result:


libtxbsa.so (libc6) => /opt/informix/lib/libtxbsa.so
libtxa.so (libc6) => /opt/informix/lib/esql/libtxa.so
libtsql.so (libc6) => /opt/informix/lib/esql/libtsql.so
libtos.so (libc6) => /opt/informix/lib/esql/libtos.so
libthxa.so (libc6) => /opt/informix/lib/esql/libthxa.so
libthsql.so (libc6) => /opt/informix/lib/esql/libthsql.so
libthos.so (libc6) => /opt/informix/lib/esql/libthos.so
libthgen.so (libc6) => /opt/informix/lib/esql/libthgen.so
libthasf.so (libc6) => /opt/informix/lib/libthasf.so
libtgen.so (libc6) => /opt/informix/lib/esql/libtgen.so
libtasf.so (libc6) => /opt/informix/lib/libtasf.so
libnetstub.so (libc6) => /opt/informix/lib/libnetstub.so
libixxa.so (libc6) => /opt/informix/lib/esql/libixxa.so
libixsql.so (libc6) => /opt/informix/lib/esql/libixsql.so
libixos.so (libc6) => /opt/informix/lib/esql/libixos.so
libixglx.so (libc6) => /opt/informix/lib/esql/libixglx.so
libixgls.so (libc6) => /opt/informix/lib/esql/libixgls.so
libixgen.so (libc6) => /opt/informix/lib/esql/libixgen.so
libixfgisql.so (libc6) => /opt/informix/lib/esql/libixfgisql.so
libixcobsql.so (libc6) => /opt/informix/lib/esql/libixcobsql.so
libixasf.so (libc6) => /opt/informix/lib/libixasf.so
libifxa.so (libc6) => /opt/informix/lib/esql/libifxa.so
libifsql.so (libc6) => /opt/informix/lib/esql/libifsql.so
libifos.so (libc6) => /opt/informix/lib/esql/libifos.so
libifglx.so (libc6) => /opt/informix/lib/esql/libifglx.so
libifgls.so (libc6) => /opt/informix/lib/esql/libifgls.so
libifgen.so (libc6) => /opt/informix/lib/esql/libifgen.so
libiffgisql.so (libc6) => /opt/informix/lib/esql/libiffgisql.so
libifcss.so (libc6) => /opt/informix/lib/libifcss.so
libifcobsql.so (libc6) => /opt/informix/lib/esql/libifcobsql.so
libifasf.so (libc6) => /opt/informix/lib/libifasf.so
libdb2tsql.so (libc6) => /opt/informix/lib/esql/libdb2tsql.so
libdb2thsql.so (libc6) => /opt/informix/lib/esql/libdb2thsql.so
libdb2thgen.so (libc6) => /opt/informix/lib/esql/libdb2thgen.so
libdb2tgen.so (libc6) => /opt/informix/lib/esql/libdb2tgen.so
libdb2ixsql.so (libc6) => /opt/informix/lib/esql/libdb2ixsql.so
libdb2ixgen.so (libc6) => /opt/informix/lib/esql/libdb2ixgen.so
libdb2ifsql.so (libc6) => /opt/informix/lib/esql/libdb2ifsql.so
libdb2ifgen.so (libc6) => /opt/informix/lib/esql/libdb2ifgen.so
libbsa.so (libc6) => /opt/informix/lib/libbsa.so



Thanks for your concern
 [2006-11-16 15:12 UTC] tony2001@php.net
Cannot reproduce.
 [2006-11-20 20:54 UTC] ggmensajes at yahoo dot es
Well, a friend of mine called Alonso 'Teletubbie' Vallejo has invented this trick for me:

1) In /opt/informix/lib/esql did:

nm -A libifos.so | grep ifx_checkAPI

result:
-------
libifos.so:         U ifx_checkAPI

It seems like the symbol is not defined there because of the "U" character preceeding it.


2) Searching in /opt/informix/esql/cli he found:

nm -A libthcli.so | grep ifx_checkAPI

result:
-------
libthcli.so:0009c5d8 T ifx_checkAPI

It seems like the symbol is defined there.  OK he copies the libthcli.so file to /opt/informix/lib/esql

3)He ran ./configure and trick the generated Makefile like this:

INFORMIX_SHARED_LIBADD = -Wl,-rpath,/opt/informix/lib/esql -L/opt/informix/lib/esql -Wl,-rpath,/opt/informix/lib -L/opt/informix/lib -lifsql -lifasf -lifgen -thcli -lifos -lifgls -ldl -lcrypt -lifglx

(regard the -thcli included to link the file)

4)Then he ran make, and copies the informix.so to /usr/lib/php/modules

And !voil?!

I don't know if this was the right way but my PHP connection to Informix is working fine right now.  

Thanks.



5)Copi
 [2006-11-20 21:10 UTC] tony2001@php.net
The "U" means "undefined", this symbol is defined in checkapi.o, which is compiled in the extension itself during the build.
If it's not, then you must be doing something terribly wrong.
 [2006-11-21 14:50 UTC] ggmensajes at yahoo dot es
But I only follow the recommended steps as i described in my first message, I am pretty sure about that.  Informix esql library was extracted directly from Informix RPMS.  OK I did not build PHP from sources again, but build the informix.so module used to be enough for previous releases (5.1.x over FC3).  I am concern now about next releases, probably it will be so hard to get an Informix environment again.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC