Welcome to PHP4IT
Main Menu
· Main Page
· Account Settings
· Forum
· Recommend Us
· Contact


Search


Solutions Categories
· All topics
· Database Import and Conversion with PHP (Feb 07, 2006)
· PHP Security (Mar 28, 2008)
· Printing (Jan 05, 2006)
· Windows PHP Solutions (Apr 04, 2008)


PHP4IT RSS Feed
Add the PHP4IT RSS Feed to your favorite RSS news reader!

  

Adding the DBF dbase extensions in Red Hat Linux/Fedora

Posted by: David on Feb 07, 2006 - 07:40 PM
php-db-conversion 

The previous two articles showed how to convert and import data from DBF files into MySQL. It's simple enough to enable the dbase extension for PHP for Windows, but if you're using Red Hat/Fedora, this is not as simple. There's no rpm that you can simply install to enable the extension, so you have to recompile and build the PHP Redhat/Fedora RPM. Here are the steps to do this (note that this can work with other extensions that you can't find the rpm for):

1) download the source rpm for PHP, usually it'll have the word "src" in the file name
2) install it - e.g. "rpm -Uvh php_src.rpm"
3) edit the php.spec file, usually located in
/usr/src/redhat/SPECS/php.spec, and add "--enable-dbase"
4) run rpmbuild - "rpmbuild -ba php.spec"
5) Go to the directory of the newly created RPMs (e.g. /usr/src/redhat/RPMS/i386/) and install them (note the --force):

rpm -Uvh --force php-4.3.8-1.1.i386.rpm php-devel-4.3.8-1.1.i386.rpm php-imap-4.3.8-1.1.i386.rpm php-ldap-4.3.8-1.1.i386.rpm php-mysql-4.3.8-1.1.i386.rpm php-pgsql-4.3.8-1.1.i386.rpm php-odbc-4.3.8-1.1.i386.rpm php-snmp-4.3.8-1.1.i386.rpm php-domxml-4.3.8-1.1.i386.rpm php-xmlrpc-4.3.8-1.1.i386.rpm php-mbstring-4.3.8-1.1.i386.rpm php-debuginfo-4.3.8-1.1.i386.rpm

That should get the job done!





Adding the DBF dbase extensions in Red Hat Linux/Fedora | Log-in or register a new user account | 0 Reviews/Comments
Reviews and Comments are opinion statements made by the author.
They do not necessarily represent the opinions of the site editor.