Re: DBM formats

From: Date: Tue, 21 Nov 2000 17:24:32 +0000
Subject: Re: DBM formats
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-26482@lists.php.net to get a copy of this message
You have to have one machine that has both types of dbms. Then, dba_open('db2file','r','db2'); dba_open('gdbmfile,'n',gdbm'); //do the transfer dba_close('db2file'); dba_close('gdbmdile'); If that is not an option, the only way around it is to export to a txt file and import that file. -Stathis. Matthew Brealey wrote: > > You wrote: > > First find out what kind of files they are with the 'file' command (CLI). > > I answered that already: > > > > > I have at home >2mb of dbm files, which > > > > file tells me > > > > are gnu dbm or ndbm 1.x. Unfortunately on my server I have > > > > Berkeley db 2.x files. > > > Then use dba_open() function (lookit-up in the manual) to transfer files > > between formats. If you have Linux, you must have installed at least gdbm:-) > > The problem is that dba is an abstraction layer - it doesn't get away > from the fact that what it is abstracting on my web server is db 2 and > on my home machine dbm - both can still only read one format. > > > > I don't understand entirely what you want to do... so I'll just throw > > > out a couple suggestions... > > Convert the files from gnu dbm to db 2. > > > > You may be able to write a C program using GDBM's compat functions to > > > convert the files before uploading. > > I'd rather not if I can help it - are there any utilities that will do > this? > > PS. I know about the compatibilty functions - I believe RPM v4 uses > them for example, but I really would like a highlevel interface to > convert. > -- Random fortune > When you say "I wrote a program that crashed Windows", people just stare at > you blankly and say "Hey, I got those with the system, *for free*". > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#26482) next »