Bug #17357 Updated: odbc_fetch_row is broke in 4.2.1

From: Date: Tue, 25 Jun 2002 02:34:14 +0000
Subject: Bug #17357 Updated: odbc_fetch_row is broke in 4.2.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11991@lists.php.net to get a copy of this message
ID: 17357 Updated by: kalowsky@php.net Reported By: atampone@attechcomputer.com Status: Closed Bug Type: ODBC related Operating System: Windows 2000 Advanced Server PHP Version: 4.2.1 New Comment: I have heard from various people that they have had issues with this. I've tested it with two ODBC drivers, against 2 different databases (a total of 4 different tests). I cannot reproduce this on my local tests. The numbers all seem to be correct with any test that I do. If I cannot reproduce this, I cannot debug this problem. It may be that this a problem specific to Windows, to which I can say that Win2k does have a problem where one of the recent service packs breaks ODBC. The solution to this was to re-install the latest MDAC from Microsoft. Unfortunately I do not remember the proper SP number so I cannot comment on that. Nor do I have acccess to a Windows based machine to do any kind of testing with/against. Previous Comments: ------------------------------------------------------------------------ [2002-06-24 21:13:42] davidr@pophost.com Whether it works for you or not.. there are 14 people who all said they can reproduce this error. It worked fine under 4.1, and only broke when we upgraded to 4.2. If so many people experienced the same problem, then there is obviously something wrong here. ------------------------------------------------------------------------ [2002-06-24 17:36:03] kalowsky@php.net This works for me in 4.2.1 and a recent pull from CVS. ------------------------------------------------------------------------ [2002-06-06 09:18:44] kalowsky@php.net Sorry that last message is more for gory@alaphsoft-bg.com ------------------------------------------------------------------------ [2002-06-06 09:16:44] kalowsky@php.net 1) Please realize that register_globals is turned off in PHP 4.2.x 2) Can you please provide a full sample script to reproduce the problem? The snippit you've shown doesn't really help as it doesn't show the full process for the code being used. ------------------------------------------------------------------------ [2002-06-06 03:59:17] gory@alphasoft-bg.com "nothing has changed to the odbc_fetch_row function in the last... 3 or 4 releases" Ok but the script below work fine i php 4.1.2, but dies in 4.2.0 and 4.2.1 function odbc_record_count($sql_id, $CurrRow = 0) { $NumRecords = 0; odbc_fetch_row($sql_id,0); while (odbc_fetch_row($sql_id)) { $NumRecords++; } if( !odbc_fetch_row($sql_id, $CurrRow)) die("odbc_record_count - odbc_fetch_row($CurrRow) failed"); return $NumRecords; } btw odbc_num_rows still dont work properly ------------------------------------------------------------------------ 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 http://bugs.php.net/17357 -- Edit this bug report at http://bugs.php.net/?id=17357&edit=1

« previous php.bugs (#11991) next »