ID: 15331 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: ODBC related Operating System: Linux PHP Version: 4.2.0 New Comment:
It's possible to get odbc_fetch_array() and odbc_fetch_object() to work without DBMAKER. This is achieved by removing a few #ifdef's in the code: php_odbc.h - line 216 => //#ifdef HAVE_DBMAKER php_odbc.h - line 219 => //#endif php_odbc.c - line 87 => //#ifdef HAVE_DBMAKER php_odbc.c - line 90 => //#endif php_odbc.c - line 87 => //#ifdef HAVE_DBMAKER php_odbc.c - line 90 => //#endif php_odbc.c - line 1229 => //#ifdef HAVE_DBMAKER php_odbc.c - line 1280 => //#endif I've tested this towards MySQL using MyODBC drivers and it seems to be working just fine. Previous Comments: ------------------------------------------------------------------------ [2002-04-24 04:34:28] [EMAIL PROTECTED] odbc_fetch_array() is only available if compiled with --with-dbmaker support (note: not tested but that's what I gathered from reading the sources). Can you try this please ? ------------------------------------------------------------------------ [2002-04-24 04:26:46] [EMAIL PROTECTED] same error on winNT4 and winXPpro and PHP 4.2.0 ------------------------------------------------------------------------ [2002-04-23 11:06:56] [EMAIL PROTECTED] Doesn't work either with php 4.2.0 on WinNT4 / Win2K, same error. ------------------------------------------------------------------------ [2002-02-01 14:16:31] [EMAIL PROTECTED] ./configure' '--prefix=/usr/share' '--datadir=/usr/share/php' '--bindir=/usr/bin' '--libdir=/usr/share' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--with-sybase-ct=/opt/sybase' '--with-mysql=/usr' '--with-gd=yes' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-tiff-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-ldap=yes' '--with-zlib=yes' '--with-bz2' '--with-gmp' '--with-xml' '--with-ttf' '--with-t1lib' '--with-mcal=/usr' '--with-imap=yes' '--with-sablot' '--with-ftp' '--with-ndbm' '--with-gdbm' '--with-mcrypt' '--with-gettext' '--with-mm' '--with-gd=yes' '--with-iodbc' '--enable-versioning' '--enable-yp' '--enable-bcmath' '--enable-trans-sid' '--enable-inline-optimization' '--enable-track-vars' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' '--enable-calendar' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-exif' '--enable-ftp' '--enable-memory-limit' '--enable-wddx' '--enable-filepro' '--enable-dbase' '--enable-ctype' '--disable-debug' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-sigchild' '--with-openssl' '--with-imap-ssl' '--with-gd=yes' '--with-apxs=/usr/sbin/apxs' '--with-pgsql=/usr' '--with-snmp' 'i386-suse-linux' Compiles fine. This should work: <html> <body> <?php $db = odbc_pconnect("TEST","test","test"); if($db){ echo("success"); $rs = odbc_exec($db, "select * from UDT_KUNDEN"); $ar = odbc_fetch_array($rs); foreach ($ar as $key => $value) { echo "Key: $key; Value: $value<br>\n"; } odbc_close($db); } ?> </body> </html> But I get "Call to undefine function". I used iODBC + FreeTDS. Other ODBC function seem to work fine. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15331&edit=1