Hey guys,

for starters I'm using php 5.3.8 with lampp on a Ubuntu 11.04 desktop. I wrote a script to open dbase .dbf files and save them in a MySQL database. I get the following error:

Fatal error: Call to undefined function dbase_open() in /opt/lampp/htdocs/yoursite/db/import/import_doctors.php on line 16

There are several solutions for the problem on google, but they date from 2006 to older. Much has changed in the php world since then.

I've already installed the package php-db, but it didn't do any good. Does anyone have an idea of how to solve this issue?

Thanks in advance.

    Have you installed the [man]dbase[/man] extension? Up-to-date instructions can be found in the obvious place (see the link)

      Weedpacket;11004978 wrote:

      Have you installed the [man]dbase[/man] extension? Up-to-date instructions can be found in the obvious place (see the link)

      I did an extra digging and it seems php 5.3.x doesn´t support dbase anymore. 🙁

      I think need to use a tool like dbf2mysql.

      Thanks anyway.

        gaseabra wrote:

        I did an extra digging and it seems php 5.3.x doesn´t support dbase anymore.

        Not in its default distribution, but you can still get it:

        The Manual wrote:

        This extension has been moved to the PECL repository and is no longer bundled with PHP as of PHP 5.3.0.

        http://www.php.net/manual/en/intro.dbase.php

        However, that page does recommend you do what you're already doing; and if it's only a once-off then building in a whole extension for the job would be overkill.

          Write a Reply...