From:             didou at keliglia dot com
Operating system: Linux/debian
PHP version:      4.3.10
PHP Bug Type:     dBase related
Bug description:  dbase_open() fails for mode = 1

Description:
------------
When opening a dbf file using dbase_open($file, 1), the call fails because
it can't reads the header infos.

We can only open dbase files in read-only or read-write mode. Either it's
an implementation or a documentation one.

If it's the intended behaviour, can you make it throw a warning more
explicit ?

Thanks in advance,

didou

Reproduce code:
---------------
<?php
error_reporting(E_ALL);

$desc = array(
 array("foo", "C", 50),
);

$df = dbase_create("db.dbf", $desc);
dbase_close($df);

var_dump(dbase_open('db.dbf', 1));

?>

Expected result:
----------------
bool(true)

Actual result:
--------------
Unable to get header

Warning: unable to open database db.dbf in /home/didou/plop.php on line
11
bool(false)

-- 
Edit bug report at http://bugs.php.net/?id=31754&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31754&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31754&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31754&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31754&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31754&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31754&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31754&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31754&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31754&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31754&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31754&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31754&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31754&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31754&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31754&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31754&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31754&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31754&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31754&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31754&r=mysqlcfg

Reply via email to