Adding dbase Support to PHP5 on Ubuntu

Last updated: Jul 18, 2008

For the popular packages Ubuntu has handy little packages that will install/add extentions to PHP, but not for dbase. Dbase is old as dirt and most people don’t use it for much anymore. I was recently working on a legacy app that works with dbase files and this was the extension i needed to allow php to work with the old dbase system.

After searching online for awhile I couldn’t really find a good answer for how to add the extension without completely reinstalling PHP5 from source.

What i ended up doing was just compiling that extenstion from source and pointing to it from my php.ini leaving my existing php5 intact.

Getting the source

First thing you will need to do install install the php5-dev package:

apt-get install php5-dev

This will give us the tools needed to work with the source code. Next grab the source. In your home directory…

mkdir php cd php apt-get source php5

Then go into the extension directory.

cd php5-5.1.2/ext/dbase

Compile the Extension

Once you are in the dbase directory do:




Followed by a,


Copy the extension

cp modules/* /usr/lib/php5/20051025/

Your php5 library directory might be named something else.

Edit php.ini

You will then need to edit the php.ini file

vim /etc/php5/apache2/php.ini

Near the extention section add:

Need to print shipping labels on your site?

Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.

Get notified on new posts or other things I'm working on