2

I'm running OSX El Capitan with XAMPP and I need to convert a dbase file to a MySQL database. I tried to use the dbase library in PHP but none of those functions are available. I headed to the documentation but it told me to recompile PHP with dbase enabled. I've got no clue on how to do that. Isn't it a matter of putting some files in the right directory?

  • A post told me to uncomment php_gmp.dll but that didn't work. No errors in the Apache log either.

  • Another post told me to run pecl install dbase, but there doesn't seem to be any package available to Terminal's response.

The source file is around 1,5 Gb in size. I purchased DBFEdit from the app store but that only shows me the content of the file, I can't split it and it's too large for any other application to open (Excel, Notepad, Coda etc) nor does it provide support to copy rows from the files into e.g. Excel. So I'm back to the dbase functions again.

Any suggestions on how to be able to use dbase on OSX?

Community
  • 1
  • 1
Ben Fransen
  • 10,884
  • 18
  • 76
  • 129
  • Why vote to close? Tell me what's wrong and I'll update the question. In my opinion this is a legitimate question though... – Ben Fransen Dec 23 '15 at 14:32

1 Answers1

0

First question is are you sure you are modifying the right php.ini for XAMPP? OSX comes with php and has a php.ini that is likely in a different location than XAMPP's.

Otherwise... you can install the php dbase extension using brew....

Install/enable the php dbase extension by first installing brew. Instructions for installing brew are here:

http://brew.sh/

Next install the appropriate extension for your version of PHP. If you do a brew search dbase it lists the following:

homebrew/php/php53-dbase
homebrew/php/php54-dbase
homebrew/php/php55-dbase
homebrew/php/php56-dbase 

To install one of them type something like this:

brew install homebrew/php/php56-dbase 

After this, you may need to modify your php.ini to point to that extension (perhaps using a symlink or other method). Brew installs extensions in locations that will likely be different than your XAMPP installation.

Clay
  • 4,700
  • 3
  • 33
  • 49