php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34080 recordset crash on trim and on fields with value null
Submitted: 2005-08-11 13:15 UTC Modified: 2005-08-11 15:20 UTC
From: mihkel at art dot tartu dot ee Assigned:
Status: Not a bug Package: COM related
PHP Version: 5.0.4 OS: MS-Win2000 SP4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mihkel at art dot tartu dot ee
New email:
PHP Version: OS:

 

 [2005-08-11 13:15 UTC] 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(); }



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-11 13:22 UTC] 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 14:35 UTC] 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 14:47 UTC] 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:49 UTC] 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 15:20 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC