#30807 [NEW]: odbc_free_result cause warning when work with 2 connection
| From: | shagren at ua dot fm | Date: | Tue, 16 Nov 2004 15:53:49 +0000 |
| Subject: | #30807 [NEW]: odbc_free_result cause warning when work with 2 connection | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-69143@lists.php.net to get a copy of this message | ||
From: shagren at ua dot fm
Operating system: Debian GNU Linux
PHP version: 4.3.9
PHP Bug Type: MSSQL related
Bug description: odbc_free_result cause warning when work with 2 connection
Description:
------------
When i run query that return "no records" mssql_query return not "positive
MS SQL result identifier". It return true.
I try this on Debian(current sarge version) with all package with
standard packagers version.
package: php4_4.3.9-1
Some info:
'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs'
'--with-regex=php' '--with-config-file-path=/etc/php4/apache'
'--disable-rpath' '--enable-memory-limit' '--disable-debug'
'--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar'
'--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-track-vars' '--enable-trans-sid' '--enable-bcmath'
'--with-bz2'
'--enable-ctype' '--with-db4' '--with-iconv' '--enable-exif'
'--enable-filepro' '--enable-ftp' '--with-gettext'
'--enable-mbstring'
'--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets'
'--enable-wddx' '--disable-xml' '--with-expat-dir=/usr'
'--with-xmlrpc'
'--enable-yp' '--with-zlib' '--without-pgsql'
'--with-kerberos=/usr'
'--with-openssl=/usr' '--enable-dbx'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--disable-static'
'--with-curl=shared,/usr' '--with-dom=shared,/usr'
'--with-dom-xslt=shared,/usr' '--with-dom-exslt=shared,/usr'
'--with-zlib-dir=/usr' '--with-gd=shared,/usr'
'--enable-gd-native-ttf'
'--with-jpeg-dir=shared,/usr' '--with-xpm-dir=shared,/usr/X11R6'
'--with-png-dir=shared,/usr' '--with-freetype-dir=shared,/usr'
'--with-imap=shared,/usr' '--with-imap-ssl' '--with-ldap=shared,/usr'
'--with-mcal=shared,/usr' '--with-mhash=shared,/usr' '--without-mm'
'--with-mysql=shared,/usr' '--with-unixODBC=shared,/usr'
'--with-recode=shared,/usr' '--enable-xslt=shared'
'--with-xslt-sablot=shared,/usr' '--with-snmp=shared,/usr'
'--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr'
'--with-t1lib=shared,/usr'
freetds version 0.61
This bug like as http://bugs.php.net/bug.php?id=24720
Reproduce code:
---------------
<?php
$dbh=mssql_pconnect('mssqlserver.com', 'user', 'password');
echo "connect :" . mssql_get_last_message ()."\n";
mssql_select_db("shagren_temp", $dbh);
echo "select_db :" . mssql_get_last_message ()."\n";
$sth=mssql_query("select * from big where 1=2", $dbh);
echo "select :" . mssql_get_last_message ()."\n";
var_dump($sth);
$data=mssql_fetch_row($sth);
echo "fetch :" . mssql_get_last_message ()."\n";
?>
Expected result:
----------------
connect :Changed database context to 'master'.
select_db :Changed database context to 'shagren_temp'.
select :Changed database context to 'shagren_temp'.
<Some MSSQL ID>
fetch :Changed database context to 'shagren_temp'.
Actual result:
--------------
connect :Changed database context to 'master'.
select_db :Changed database context to 'shagren_temp'.
select :Changed database context to 'shagren_temp'.
bool(true)
Warning: mssql_fetch_row(): supplied argument is not a valid Sybase result
resource in /root/tmp/mssql.php on line 9
fetch :Changed database context to 'shagren_temp'.
--
Edit bug report at http://bugs.php.net/?id=30807&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30807&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30807&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30807&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30807&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30807&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30807&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30807&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30807&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30807&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30807&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30807&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30807&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30807&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30807&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30807&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30807&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30807&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30807&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30807&r=mysqlcfg