I am using the php dBase extension for many years. Because I have a PHP program that needs to retrieve data from a dBase database file. The dBase file is from a Windows program. I posted five years ago to show you the simple way to install the dBase extension on php7.0.

Now it is 2022, It is the guide on Ubuntu 20.04 Lts, and php7.4.

Let me make it quick.

Run the following command after you install php7.4 on Ubuntu 20.04.

sudo apt install php-pear php-dev

sudo pcel install dbase-7.1.1

The first command is to install the PECL environment.  The second command is to install the dBase extension into the system through PECL. The latest version is 7.1.1.

After installation, the result asked me to manually add the following into the php.ini file.

extension=dbase.so

So I edit the /etcd/php/7.4/fpm/php.ini, add it to the end of the file.

Then run the phpinfo page to check it.

To check the PHP functions with the dBase file,  https://www.php.net/manual/en/intro.dbase.php

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *