From:             web at affenkrieger dot de
Operating system: Mandrake Linux 9.0
PHP version:      4.2.3
PHP Bug Type:     Sybase-ct (ctlib) related
Bug description:  Extension doesn't work - unable to load dynamic library

Hi,

i tried to compile and use the Sybase-CT extension of PHP, but it won't
work. Here we go:

I have a Mandrake Linux 9.0 system with a fully configured Apache + PHP
webserver. PHP 4.2.3 works fine as a Apache module. I downloaded the
sources of PHP 4.2.3 from php.net and compiled the Sybase-CT extension as
a shared object:
$ ./configure --with-apxs=/path/to/apxs
--with-sybase-ct=shared,/opt/sybase-11.9.2

The Sybase ASE 11.9.2 resides in /opt/sybase-11.9.2, the libs are
available under /opt/sybase-11.9.2/lib

Compilation works fine, but when i include the new .so in the PHP.ini and
restart the Apache webserver, it throws this warning into the error_log:
> PHP Warning:  Unable to load dynamic library
> '/usr/lib/php/extensions/sybase_ct.so' -
> /opt/sybase-11.9.2/lib/libsybtcl.so: undefined symbol:
> comn_free in Unknown on line 0

Trying to use Sybase functions in PHP result in segmentation faults.

$ ldd sybase_ct.so
  libinsck.so => /opt/sybase-11.9.2/lib/libinsck.so (0x40008000)
  libsybtcl.so => /opt/sybase-11.9.2/lib/libsybtcl.so (0x4000b000)
  libintl.so.2 => /lib/libintl.so.2 (0x40038000)
                  ^^^^^^^^^^^^^^^^
  libcomn.so => /opt/sybase-11.9.2/lib/libcomn.so (0x40040000)
  libct.so => /opt/sybase-11.9.2/lib/libct.so (0x40098000)
  libcs.so => /opt/sybase-11.9.2/lib/libcs.so (0x400f5000)
  libc.so.6 => /lib/i686/libc.so.6 (0x40102000)
  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

It seems that the sybase_ct.so has been linked to a wrong library in /lib,
instead of $SYBASE/lib, and i found no way to tell the system, to use the
Sybase one.

/usr/lib/libintl.so & /lib/libintl.so.2 are symlinks to
/lib/libintl.so.2.0.1
It seems to be a lib of the "gettext" program.

Yes, $SYBASE/lib is added to /etc/ld.so.conf
Yes, the Sybase lib are correctly listed by 'ldconfig -p'
No, setting LD_LIBRARY_PATH doesn't affect the result of ldd
No, normally LD_LIBRARY_PATH isn't set at all.

DBD::Sybase works fine with Sybase ASE. Micheal Peppler wrote in
sybase.public.ase.linux (news:[EMAIL PROTECTED]) that it
might be a PHP compilation problem, and he knows a bit of that Sybase
stuff ;-)

Regards,
Nils.
-- 
Edit bug report at http://bugs.php.net/?id=22595&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22595&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22595&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22595&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22595&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22595&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22595&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22595&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22595&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22595&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22595&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22595&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22595&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22595&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22595&r=gnused

Reply via email to