#38357 [Opn]: dbase_open can't open DBase 3 dbf file.
| From: | rodrigo at fabricadeideias dot com | Date: | Sun, 06 Aug 2006 14:00:44 +0000 |
| Subject: | #38357 [Opn]: dbase_open can't open DBase 3 dbf file. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100422@lists.php.net to get a copy of this message | ||
ID: 38357
User updated by: rodrigo at fabricadeideias dot com
Reported By: rodrigo at fabricadeideias dot com
Status: Open
Bug Type: dBase related
Operating System: Linux
PHP Version: 5.1.4
New Comment:
There is a downloadable copy of the dbf file at
<http://dev.ipresto.com.br/downloads/12MU2500G.dbf>.
Previous Comments:
------------------------------------------------------------------------
[2006-08-06 13:55:05] rodrigo at fabricadeideias dot com
Description:
------------
When trying to open a DBase 3 dbf file I get the following error:
Unable to get header
Warning: dbase_open(): unable to open database 12MU2500G.dbf in
/var/www/localhost/htdocs/shape/dbase_open_bug.php on line 4
I believe this is a DBase 3 file as file returns:
# file 12MU2500G.dbf
12MU2500G.dbf: DBase 3 data file (22 records)
I also believe this file isn't corrupted as both DBD::XBase module for
Perl and OpenOffice Base read the file without problems.
Reproduce code:
---------------
<?php
$db = dbase_open('12MU2500G.dbf', 0);
echo $db ? "Opened.\n" : "Not opened.\n";
?>
Expected result:
----------------
Opened.
Actual result:
--------------
Unable to get header
Warning: dbase_open(): unable to open database 12MU2500G.dbf in
/var/www/localhost/htdocs/shape/dbase_open_bug.php on line 2
Not opened.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38357&edit=1