Bug #16286 [Com]: undefined symbol: SQLParamData

From: Date: Wed, 01 Sep 2021 18:43:19 +0000
Subject: Bug #16286 [Com]: undefined symbol: SQLParamData
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236274@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=16286&edit=1 ID: 16286 Comment by: lildurk16286 at gmail dot com Reported by: gory at alphasoft-bg dot com Summary: undefined symbol: SQLParamData Status: Closed Type: Bug Package: ODBC related Operating System: Slackware 7.1 PHP Version: 4.1.2 Block user comment: N Private report: N New Comment: Lil Durk is a private agency dedicated to providing responsible access to legal cannabis for adults aged 19 and older. We’re an exclusively online retailer and wholesaler for recreational cannabis and a trusted source for information about cannabis and cannabis-related issues. We believe our work is meaningful and we take pride in our mandate to promote the socially responsible use of legal cannabis. https://lildurk.com/ Previous Comments: ------------------------------------------------------------------------ [2002-05-21 23:31:36] kalowsky@php.net This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Not really fixed, but can you please try a more recent CVS snapshot? The build system was drastically changed, and I'm not sure if this was fixed or not. If it was great, if not, please re-open the bug. ------------------------------------------------------------------------ [2002-04-07 13:04:47] otmar dot suessbauer at t-online dot de 29 Mar 3:59am] gory@alphasoft-bg.com sorry, I was on holyday for some days. >I solved my problem compiling --with-iodbc only I never used IODBC for SQL Anywhere because it ships with its own ODBC libs. I think it should have the best performance (!?). But maybe IODBC works fine. Important is: the managed odbc in $ASANY/drivers is only for MOBYLINK and has not to be mixed up with the non managed version in $ASANY/lib for ASA. In asa_config.sh they append $ASANY/drivers/lib to $LD_LIBRARY_PATH. This path could cause problems with -lodbc, because there is a libodbc.so you can't use for ASA ! >but while trying diferent combinations i have strange side >effects. when i set CUSTOM_ODBC_LIBS="-llibdblib8 - >llibdbodbc8" and compile without > --with-custom-odbc=/usr/local/sybase/SYBSsa8 \ I think, you can't mix it up. --with-iodbc and --with-custom-odbc are two completely different driver families and the environment variable CUSTOM_ODBC_LIBS refers to the custom_odbc way. And this recommends 2 libs with standard names (preferable in /usr/lib I suppose), so the custom odbc libs have to be symlinked (I had some experience on another new machine, so I'm quite sure, it works): ln -s /opt/sybase/SYBSsa8/lib/libdblib8.so.1 \ /usr/lib/libdblib.so ln -s /opt/sybase/SYBSsa8/lib/libdblib8.so.1 \ /usr/lib/libdblib.so.1 ln -s /opt/sybase/SYBSsa8/lib/dbodbc8.so.1 \ /usr/lib/libodbc.so ln -s /opt/sybase/SYBSsa8/lib/dbodbc8.so.1 \ /usr/lib/libodbc.so.1 otherwise -lodbc -ldblib won't work. Still I had to append "-lodbc -ldblib" to the final make step of php 4.1.2 because it was missing. ------------------------------------------------------------------------ [2002-03-29 03:59:55] gory at alphasoft-bg dot com Re [28 Mar 10:52am] otmar.suessbauer@t-online.de As I had no idea how to get config.m4 work I simply cut and paste the last step of make and appended both libs, because I hoped, ext/odbc/php_odbc.lo was compile d correctly: I solved my problem compiling --with-iodbc only but while trying diferent combinations i have strange side effects. when i set CUSTOM_ODBC_LIBS="-llibdblib8 -llibdbodbc8" and compile without --with-custom-odbc=/usr/local/sybase/SYBSsa8 \ php_info() says ODBC custom not iodbc ??? ------------------------------------------------------------------------ [2002-03-28 10:52:35] otmar dot suessbauer at t-online dot de I had the same problem with PHP 4.1.2, SuSE 7.3 and SQLAnywhere 8 and Apache 1.3.24 What I did: ASANY=/opt/sybase/SYBSsa8 1) /etc/ld.so.config append new line with /opt/sybase/SYBSsa8/lib run ldconfig 2) ln -s $ASANY/lib/libdblib8.so.1 /usr/lib/libdblib.so.1 ln -s $ASANY/lib/dbodbc8.so.1 /usr/lib/libdbodbc.so.1 ln -s $ASANY/lib/dbodbc8.so.1 /usr/lib/libdbodbcinst.so.1 (actually I did some more links e.g. libdbtasks8 etc., so I'm not sure what's all needed. With SQLAnywhere 5.5 these links had to be done) 3) Set environment, load asa_config.sh !!! export CFLAGS or CPPFLAGS="-DODBC_UNIX" export CUSTOM_ODBC_LIBS="-ldblib -lodbc" 4) First test sybase sample odbc.c in $ASANY/samples/asa/c worked fine with running asademo.db ldd of odbc sample showed: libdblib8.so.1 => /opt/sybase/SYBSsa8/lib/libdblib8.so.1 (0x40016000) libdbtools8.so.1 => /opt/sybase/SYBSsa8/lib/libdbtools8.so.1 (0x400ac000) dbodbc8.so.1 => /opt/sybase/SYBSsa8/lib/dbodbc8.so.1 (0x40209000) libc.so.6 => /lib/libc.so.6 (0x402cf000) libdbtasks8.so.1 => /opt/sybase/SYBSsa8/lib/libdbtasks8.so.1 (0x403f5000) libdl.so.2 => /lib/libdl.so.2 (0x40400000) libm.so.6 => /lib/libm.so.6 (0x40405000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) 5) Simple PHP configuration: ./configure --with-apxs=/usr/local/apache/bin/apxs \ --with-custom-odbc=/opt/sybase/SYBSsa8 \ In last step of make while linking I missed -ldblib and -lodbc and had a look in ext/odbc/config.m4, rules seemed ok for CUSTOM_ODBC_LIBS. But definitely this libs missed at the end. ldd of libphp4.so didn't show any odbc libs and apachectl start crashed with error SQLParamData. As I had no idea how to get config.m4 work I simply cut and paste the last step of make and appended both libs, because I hoped, ext/odbc/php_odbc.lo was compiled correctly: /bin/sh /work/php-4.1.2/libtool --silent --mode=link gcc -I. -I/work/php-4.1.2/ -I/work/php-4.1.2/main -I/work/php-4.1.2 -I/usr/local/apache/include -I/work/php-4.1.2/Zend -I/work/php-4.1.2/ext/mysql/libmysql -I/opt/sybase/SYBSsa8/include -I/work/php-4.1.2/ext/xml/expat -DODBC_UNIX -DLINUX=22 -DUSE_HSREGEX -I/work/php-4.1.2/TSRM -DODBC_UNIX -prefer-pic -o libphp4.la -rpath /work/php-4.1.2/libs -avoid-version stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mysql/libmysql.la ext/odbc/libodbc.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt -lodbc -ldblib After that ldd of libphp4.so looked like this: libdl.so.2 => /lib/libdl.so.2 (0x4018a000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4018e000) libresolv.so.2 => /lib/libresolv.so.2 (0x401bb000) libpam.so.0 => /lib/libpam.so.0 (0x401cd000) libm.so.6 => /lib/libm.so.6 (0x401d7000) libnsl.so.1 => /lib/libnsl.so.1 (0x401f9000) dbodbc8.so.1 => /opt/sybase/SYBSsa8/lib/dbodbc8.so.1 (0x4020f000) libdblib8.so.1 => /opt/sybase/SYBSsa8/lib/libdblib8.so.1 (0x402c4000) libc.so.6 => /lib/libc.so.6 (0x4035a000) libdbtasks8.so.1 => /opt/sybase/SYBSsa8/lib/libdbtasks8.so.1 (0x40480000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) and apache started without errors. Remember LD_LIBRARY_PATH (asa_config.sh) has to be set before starting apache, otherwise it's producing seg faults... a little test finally worked: <html><head><title>Example 1</title></head><body> <? $con = odbc_connect("asademo","dba","sql"); if ( $con == 0 ) { echo "Error! No ODBC-Connection"; } else { $result = odbc_exec($con, "sa_conn_info" ); $count = odbc_result_all($result); odbc_close($con); } ?> </body></html> ~/.odbc.ini looks like: [asademo] ENG=asademo UID=dba PWD=sql and the Anywhere Server was started like: dbsrv8 asademo.db -ud -n asademo So at the end it seems to me that making the correct rules in ext/odbc doesn't work. Hope this helps Kind regards Otmar Suessbauer ------------------------------------------------------------------------ [2002-03-27 10:24:38] gory at alphasoft-bg dot com also try with CUSTOM_ODBC_LIBS="-llibdblib8.so -llibdbodbc8.so" but same thing ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=16286 -- Edit this bug report at https://bugs.php.net/bug.php?id=16286&edit=1

« previous php.bugs (#236274) next »