ID:               42054
 User updated by:  battisti at actgate dot com
 Reported By:      battisti at actgate dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         ODBC related
 Operating System: Red Hat Enterprise Linux WS rele
 PHP Version:      4.4.7
 New Comment:

I compiled the latest snapshot, (php5.2-200707230830)
on a test machine (Fedora Core 3, 32 bit ) and the problem has
disappeared...

Now, before upgrading the PHP installation on the production machine, I
would like to know since what stable version this problem has been fixed
(I cannot install 5.2.4-dev there...).

Also, I'm not sure if the problem could be related to the fact that the
test machine is 32 bit, and the producion one is 64 bit.

Any advice?
Thank you very much!


Previous Comments:
------------------------------------------------------------------------

[2007-07-20 23:16:51] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

And I also suggest using the PDO ODBC driver instead..

------------------------------------------------------------------------

[2007-07-20 16:42:15] battisti at actgate dot com

Description:
------------
The odbc_result() function crashes if the value requested is a NULL
value in the DB.

Tested on: RHEL 4 WS   64 bit
Architecture: x86_64
PHP version: 4.3.9
DB: PostgreSQL 8.2.4
unixODBC: 2.2.9 


$field_value = odbc_result($this->Query_ID, $i );

where $i is an index of a NULL value in the DB.

Reproduce code:
---------------
$field_value = odbc_result($this->Query_ID, $i );

where $i is an index of a NULL value in the DB.

Expected result:
----------------
$field_value == "" or "NULL" or ERROR, but I do not expect a crash :)

Actual result:
--------------
Simply a crash!



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42054&edit=1

Reply via email to