[H-GEN] Shared library loading

Michael Anthon mca at tams.com.au
Fri Jun 4 00:11:49 EDT 1999


(Note reply-to: being general at humbug.org.au vs Michael Anthon <mca at tams.com.au>)

I am trying to get the Sybase CT libs compiled into PHP so that I can
attempt to access data on an existing MS SQL Server (don't ask) from PHP
scripts running on a Linux box.  It all compiles ok, but when Apache tries
to load the libphp3.so modules, it exits with the following error....

bash> /etc/rc.d/init.d/httpd start
Syntax error on line 27 of /www/conf/httpd.conf:
Cannot load /www/libexec/libphp3.so into server: /www/libexec/libphp3.so:
undefined symbol: cs_dt_info
/etc/rc.d/init.d/httpd start: httpd could not be started

Now, we discovered that by using the LD_PRELOAD env variable, set as
follows, Apache will load the module 

LD_PRELOAD=/usr/local/sybase/lib/libinsck.so.10:/usr/local/sybase/lib/libsyb
tcl.so.10:/usr/local/sybase/lib/libct.so.10:/usr/local/sybase/lib/libintl.so
.10:/usr/local/sybase/lib/libcomn.so.10:/usr/local/sybase/lib/libcs.so.10

This seems to be some sort of dynamic library loading problem.  I currently
have the following lib files and links set up [1]
And the following [2] output from ldconfig indicates that it finds them OK.

Could anyone please point out what might be happening here and what I am
doing wrong?  It's got me stumped.

Cheers
Michael A.

[1]
bash> ls -l /usr/local/sybase/lib/
total 1910
-rw-r--r--   1 2677     200         76104 Jun  3  1995 libblk.a
-rwxr-xr-x   1 root     root        75269 Feb 21  1996 libblk.so.10
-rw-r--r--   1 2677     200        318634 Jun  3  1995 libcomn.a
lrwxrwxrwx   1 root     root           13 Jun  4 13:56 libcomn.so ->
libcomn.so.10
-rwxr-xr-x   1 root     root       306084 Feb 18  1996 libcomn.so.10
-rw-r--r--   1 2677     200         52406 Jun  3  1995 libcs.a
lrwxrwxrwx   1 root     root           33 Jun  4 14:01 libcs.so ->
/usr/local/sybase/lib/libcs.so.10
-rwxr-xr-x   1 root     root        54479 Feb 18  1996 libcs.so.10
-rw-r--r--   1 2677     200        407806 Jun  3  1995 libct.a
-rwxr-xr-x   1 root     root       375190 Feb 18  1996 libct.so.10
-rw-r--r--   1 2677     200          5546 Jun 16  1995 libinsck.a
-rw-r--r--   1 2677     200          5848 Jun  3  1995 libinsck.async.a
lrwxrwxrwx   1 root     root           14 Jun  4 13:57 libinsck.so ->
libinsck.so.10
-rwxr-xr-x   1 root     root         8904 Feb 18  1996 libinsck.so.10
-rw-r--r--   1 2677     200         32906 Jun  3  1995 libintl.a
lrwxrwxrwx   1 root     root           13 Jun  4 13:57 libintl.so ->
libintl.so.10
-rwxr-xr-x   1 root     root        33267 Feb 18  1996 libintl.so.10
-rw-r--r--   1 2677     200         90230 Jun  3  1995 libsybtcl.a
lrwxrwxrwx   1 root     root           15 Jun  4 13:58 libsybtcl.so ->
libsybtcl.so.10
-rwxr-xr-x   1 root     root        83538 Feb 18  1996 libsybtcl.so.10

[2]
bash> ldconfig -p | grep sybase
        libsybtcl.so.10 (ELF) => /usr/local/sybase/lib/libsybtcl.so.10
        libsybtcl.so (ELF) => /usr/local/sybase/lib/libsybtcl.so
        libintl.so.10 (ELF) => /usr/local/sybase/lib/libintl.so.10
        libintl.so (ELF) => /usr/local/sybase/lib/libintl.so
        libinsck.so.10 (ELF) => /usr/local/sybase/lib/libinsck.so.10
        libinsck.so (ELF) => /usr/local/sybase/lib/libinsck.so
        libct.so.10 (ELF) => /usr/local/sybase/lib/libct.so.10
        libcs.so.10 (ELF) => /usr/local/sybase/lib/libcs.so.10
        libcs.so (ELF) => /usr/local/sybase/lib/libcs.so
        libcomn.so.10 (ELF) => /usr/local/sybase/lib/libcomn.so.10
        libcomn.so (ELF) => /usr/local/sybase/lib/libcomn.so
        libblk.so.10 (ELF) => /usr/local/sybase/lib/libblk.so.10

--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list