简体   繁体   中英

dbase_open() can't open a .dbf file

I've installed the dbase php extension in my ubuntu server. And I see the dbase_open(...) doesn't show any error but though I provide an existing .dbf file path with mode (0 or 2) it can't open the file. No error but the returned link pointer is false. Can anyone tellme what will be the possible causes of not opening the .dbf file?

I've installed the dbase extension using this command: [pecl install channel://pecl.php.net/get/dbase]

I've added the dbase.so extension in php.ini, restarted the server and I can see the dbase information in phpinfo().

Here are few basic information:

  1. PHP Version 5.3.10-1
  2. ubuntu3.10
  3. Apache 2.0
  4. Handler dbase extension version: 5.1.0

Any help will be appreciated.

Was *.dbf file created from visual foxpro? If so, try the following:

COPY TO filename.dbf TYPE FOX2X

I was having similar problem with you and then I tried to read dbase_open function documentation again, I found notes from jmertic at ncscredit dot com that emphasized about that thing.

As additional information related with FOX2X. FOX2X format creates a new table that can be opened in earlier versions of FoxPro (versions 2.0, 2.5, and 2.6). Other than that, you should consider differences between latest version visual foxpro field type and foxpro 2.x field type. You may read this documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM