#34080 [Opn->Bgs]: recordset crash on trim and on fields with value null
| From: | sniper@php.net | Date: | Thu, 11 Aug 2005 13:20:54 +0000 |
| Subject: | #34080 [Opn->Bgs]: recordset crash on trim and on fields with value null | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83368@lists.php.net to get a copy of this message | ||
ID: 34080
Updated by: sniper@php.net
Reported By: mihkel at art dot tartu dot ee
-Status: Open
+Status: Bogus
Bug Type: COM related
Operating System: MS-Win2000 SP4
PHP Version: 5.0.4
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2005-08-11 14:49:05] mihkel at art dot tartu dot ee
Correction:
'xObject id #4xObject id #5'
(where is the edit button when you need one? :/ )
------------------------------------------------------------------------
[2005-08-11 14:47:39] mihkel at art dot tartu dot ee
Update:
$x=$rs['kursjuh'];
echo 'x'.$x;
echo 'x'.$rs['kursjuh'];
gives me 'Object id #4Object id #5' - this can't be normal.
------------------------------------------------------------------------
[2005-08-11 14:35:38] mihkel at art dot tartu dot ee
The crash is gone now. (for both trim and null fields)
BUT. fields with the value NULL return now 'Object id #4' which doesn't
sound right. Am i missing somethig and it is suposed to do so?
(i would prefer 'NULL' or '' as return value)
------------------------------------------------------------------------
[2005-08-11 13:22:38] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-08-11 13:15:04] mihkel at art dot tartu dot ee
Description:
------------
Database: MS-SQL Server 2000 (in case it is important)
See code below.
Expecting it to NOT hang forever and produce some output.
Unfortunately - if ANY of the lines with crash comment behind them is
present it will hang forever (until web-server timeout).
'user' - is a present field of type char(20) and value is never NULL.
'kursjuh' - is a present field of type char(1) and will result a crash
only if field value is NULL.
PHP fails to produce error log - so, no info there.
Reproduce code:
---------------
$db=new COM("ADODB.Connection");
$db->Open("Driver={SQL Server};Server=***;Database=***;");
$dta=$db->Execute("SELECT * FROM Qigus");
while(!$dta->EOF) {
echo $dta->Fields['kursjuh']->Value; // crash
echo $dta['kursjuh']; // crash
echo $dta['user']; // works fine
echo trim($dta['user']); // crash
$dta->MoveNext(); }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34080&edit=1