Monday, 26 March 2012

Dbase, PHP and Ubuntu


Dbase, PHP and Ubuntu

 

 

I needed to have PHP compiled with dBase for webdevelopment. dBase was dropped from the standard libraries of Ubuntu at version 5.04 and I couldn't find any solution for installing PHP with dBase support.

I don't imagine this will help the community much, but I had a specific need and finally worked out the solution. Its here mainly for my sanity should I need to replicate it in the future.

NB. It will work for the installation and removal of other PHP components.

Install some packages you'll need later on:

sudo apt-get install shtool dpkg-dev
Download the PHP source file
sudo apt-get source php5
We need to alter the rules to allow PHP compilation with dBase support.
Enter the new PHP directory
Edit the rules file ./debian/rules
Change the COMMON_CONFIG statement
add: "--enable-dbase \"
Now we need to build dependancies and then build PHP. The building of the dependancies requires a significant download and the PHP build tends to take a fair amount of time.
sudo apt-get build-dep php5
sudo dpkg-buildpackage
Once this has finally finished, the .deb files will have been created - if they aren't in the current directory try it's parent.

The final job is to install the new PHP library, copy it to the apache modules folder and then restart apache.
sudo dpkg -i php5*.deb
sudo cp ~/php5-*/apache2-build/libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
sudo /etc/init.d/apache2 restart

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Related Posts Plugin for WordPress, Blogger...