Forum Moderators: coopster

Message Too Old, No Replies

urgent:how to enable dbase support.

dbase .dbf file support

         

priteshgupta

9:37 am on Apr 2, 2010 (gmt 0)

10+ Year Member



hi
I have a requirement to upload .dbf file from my clients but when calling the dbase_open() function gives fatal error:call to undefined function.I have checked phpinfo(); function and .dbf support is missing.I have done some searching about how to enable dbase support.I found that i need to compile php with --enable-dbase option. my problem is that i don't know to how to compile php or where to run this ./configure --enable-dbase .Please help me out there.Please tell me if there is any other way to do this.
Thanks in advance

Frank_Rizzo

11:47 am on Apr 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may find it easier to convert the dbf file into something as simple as CSV. Then use php to read the csv file.

If that is not a solution then you will have to compile php with dbase.

You do not state which O/S you are using. If linux and php was installed with yum try

yum install php-dbase

(note only do this if php was installed with yum, if it was compiled from source you could get different versions installed)

If you are using debian try

apt-get php-dbase

with the same caveat as above.

Installing php from source is easy.

1. Download the latest version from php.net
2. Unzip / tar
3. change to the install directory
4. ./configure with parameters
5. stop apache
6. make
7. make install
8. start apache

The bit you need to check is ./configure. You will have to run it with the current options you have and add an option for dbase.

Look at your current configure command in phpinfo() It could be something like:

./configure' '--prefix=/usr' '--with-config-file-path=/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-calendar' '--enable-magic-quotes' '--enable-inline-optimization' '--enable-soap' '--with-zlib' '--with-openssl=/usr' '--with-mysql' '--with-curl' '--without-sqlite' '--disable-pdo' '--with-gd' '--enable-bcmath' '--enable-mbstring'

You will need to run

./configure --prefix/usr --with-config-file-path=/etc ..... --enable-dbase

priteshgupta

7:14 am on Apr 3, 2010 (gmt 0)

10+ Year Member



Thank I going to try this now and will reply asap

priteshgupta

7:26 am on Apr 3, 2010 (gmt 0)

10+ Year Member



hi..
Thanks for reply.I am using centos.
when i tried to run the
yum install php-dbase command
,it is showing following message.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.iitm.ac.in
* base: ftp.iitm.ac.in
* extras: ftp.iitm.ac.in
* updates: ftp.iitm.ac.in
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php-dbase available.
Nothing to do

Please tell me what to do.

Frank_Rizzo

9:21 am on Apr 3, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First see what php you have installed

yum list installed |grep php

Make sure the | is the broken pipe character.

That should list what version of php you have installed and any add-ons for it.

If it lists php try this:

yum install php-common

Do not continue if there are any dependencies. If there are none then install it, restart apache, and check phpinfo() for dbase support.

priteshgupta

12:02 pm on Apr 3, 2010 (gmt 0)

10+ Year Member



hi
when i am running
yum list installed |grep php
it is showing nothing ie.it not listing any thing.

Frank_Rizzo

1:14 pm on Apr 3, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This means that php was not installed via yum. You will have to follow the instructions in post 2 above.

Download php, unzip, configure, make.

priteshgupta

10:31 am on Apr 7, 2010 (gmt 0)

10+ Year Member



Thanks to you all budies...
i have asked same question in cpanel support(now i have registered version)
they told me their is an option to enable dbase in the cpanel exhaustive list ...
any way thanks for the help..