Back to the blog
Recent Posts
-
Oct 17
How do you mockup websites?
-
Oct 09
Something's not right with Android's UI
-
Oct 06
My lance is free
-
May 18
A short story about usability
-
Apr 20
Twitter as social computer
-
Apr 03
techAU troubles - techAU.tv complains, new domain is born
Most Popular Posts
-
Why you should be using a framework
-
Perhaps the world doesn't need another framework
-
Rewriting URLs with Apache's mod_rewrite and PHP
-
Five easy things that make you a better web developer
About the Blog

I'm a web designer and web application developer in Melbourne, Australia. If you find anything useful, leave me a comment, and if you need web design, development, or accessibility and usability consulting, contact me! Cheers.
Twitter: joshsharp
How to add extensions to PHP 5 running as an Apache 2 module
Sunday 04 Nov, 2007 08:22 PM
Just a quick tip — hopefully this will help anyone having the same issue as I was. Our development server at work runs Ubuntu 6.10 (using the default Ubuntu LAMP setup), and this setup happens to use Apache 2, with PHP as an Apache module (rather than a CGI extension, or whatever).
Now this default setup doesn't include some fairly standard PHP extensions like cURL and the GD libraries — but working out how to get these included caused me no end of trouble. I didn't want to recompile PHP, but didn't understand why adding a reference to libgd.so was giving me the error that it wasn't a valid PHP library. And surprise surprise, it's not; you need the PHP bindings. So for those who are in the same situation and don't want to recompile PHP, but need those extensions, there's actually a very simple solution that was incredibly hard to find on the web.
You can just install the packages from the repository.
So if you're a GUI person, you can use Synaptic and search for "php5" to retrieve the list of available modules. Or if you prefer the terminal, it's as easy as typing sudo apt-get install php5-gd or sudo apt-get install php5-curl.
I wish somebody had told me that.
Comments
libxpm4 php5-gd ttf-dejavu ttf-dejavu-core ttf-dejavu-extra x11-common
why in the havens i need so many X11 things on my server since is just a server and not a desktop system?!?!
