I used dba-open (http://us2.php.net/manual/en/function.dba-open.php)
to create a simple database file. The linux file command tells me
that the file is just "data":
# file test.db
test.db: data
I assume this is refered to a "Constant Database" or a DB2 file.
I'm able to insert, fetch, and delete entries. However I'm trying to
find out exactly what kind of file this is since the documentation
doesn't tell me what "default" handler it used when creating the file.
thanks,
-eric
Actually this is working as expected because the file command recognizes
the file structure depending on the file system, the file's magic number
and the language. Since no info is provided by the file command it
doesn't recognize the file and it names everything else as data.
You can find the available magic numbers for your system in a local file
that is used by the file command to recognize the file. In my system and
in all Red-Hat like systems this file is:
/usr/share/magic
This is not a PHP question but it is rather a start to understand the
file comamnd.
If you need to check if a file is a dba file then try to open it as a
dba file as the manual suggests:
|$id = dba_open("/tmp/test.db", "n", "gdbm");
if (!$id) {
echo "dba_open failed\n";
exit;
}
|||
and if it fails then you will know that it is not really a dba file.
In case you didn't get this it is because of my poor english or because
you asked the wrong question.
--
Thodoris