ID:               44850
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kindaian at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         dBase related
 Operating System: Windows XP Pro
 PHP Version:      5.2.5
 New Comment:

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




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

[2008-04-28 01:00:07] kindaian at gmail dot com

This is the begin (the 256 first characters) of the file (changed the
record number to 1 and the terminator character to 0D, but it didn't
sorted it out):

03 6C 04 02 01 00 00 00 81 00 5B 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 43 4F 44 49 47 4F 00 00 00 00 00 43 00 00 00 00
0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 45 53 43 52 49 43 41
4F 00 00 43 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
44 45 53 43 5F 41 55 58 00 00 00 43 00 00 00 00 28 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 0D 20 36 30 30 2F 30 2C 39 30 20 20 41 55 54 4F
20 41 44 45 53 49 56 41 2C 20 32 20 54 45 4C 41 53 2C 20 30 2C 39 30 20
4D 4D 20 20 20 20 20 20 20 20 20 20 53 54 49 43 4B 59 20 42 41 43 4B 2C
20 30 2C 39 30 20 6D 6D 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 36 30 30 2F 30 2C 39 35 20 20 41 55 54 4F 20 41 44 45 53
49 56 41 2C 20 32 20 54 45 4C 41 53 2C 20 30

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

[2008-04-28 00:26:01] kindaian at gmail dot com

Description:
------------
I've a dbf with a problem in the array that holds the field
definitions, so when i try to open it it crashes.

I've tryed to open it in DBU and when i try to access the fields, it
exits with "BASE/1132 bound error: array access".

In PHP, it just exits with an error that it can't open the file and
stops execution ("Error reading DBF's number of fields").

The problem is that I've the code enclosed by a try/catch and the
program instead of gracefully execute the catch... just breaks.

Maybe related with the way error handling is handled inside the dbase
functions as pointed out also in the bug #37589 "dbase_open doesnt act
like it should" for another issue.

Reproduce code:
---------------
try {
        $dbf = @dbase_open($file_name, 0); 
} catch (Exception $e) {
        echo ("Error opening $file_name");
}

Expected result:
----------------
I was expecting that the program would print the error message and
carry on.

Actual result:
--------------
The execution just stops where the error happens, and no more code is
processed.

The error "Error reading DBF's number of fields" is shown in the
browser.


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


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

Reply via email to