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-devDownload the PHP source file
sudo apt-get source php5We need to alter the rules to allow PHP compilation with dBase support.
Enter the new PHP directoryNow 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.
Edit the rules file ./debian/rules
Change the COMMON_CONFIG statement
add: "--enable-dbase \"
sudo apt-get build-dep php5Once this has finally finished, the .deb files will have been created - if they aren't in the current directory try it's parent.
sudo dpkg-buildpackage
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
5 comments:
Thanks, that's be usefull
I tried the same thing but when I got to buildpackage it gave a lot of errors and warnings..and the .deb files weren't there
You rock. I was really disappointed when I couldn't run my old PHP scripts in Ubuntu. Your instructions worked flawlessly for me on Intrepid. Now if only I didn't have to re-compile PHP to use a couple of stupid dbase functions...
A quick question: Now the Update Manager is asking me to update php5-dbg, php5-cli, and php5-cgi. Is there a way to tell it that I want to use my custom-compiled versions and not nag about updating them?
Don't think so. We finally moved all our dbase dbs into Postgres, so I don't have to manaually recompile PHP each time we get security fixes. Life is so much simpler.
Post a Comment