PHP libxml issue while compiling
Today I had some trouble getting libxml to work in PHP. I was compiling PHP 5.3.10 for a client's Joomla site and it needs libxml. The issue seemed to be common...

Today I had some trouble getting libxml to work in PHP. I was compiling PHP 5.3.10 for a client’s Joomla site and it needs libxml. The issue seemed to be commonly happening to many people and I came across a number of forum threads on the topic.
The suggestions mostly hover around installing libxml2 development package. This can be done in Debian or Ubuntu by:
apt-get install libxml2 libxml2-dev
On other Linux distributions you may try libxml2-devel
But I had already done that and still libxml was not showing up in PHP. I had the –with-libxml-dir setting in ./configure with no luck.
Then I came across the –enable-libxml setting, which although is not mentioned directly in the ./configure --help, it should have come to my mind. This is how you enable (or disable with –disable) any module from the ext/ directory. Anyway, I found it mentioned here and that worked! The reason for this is because I had –disable-all option set. So all default modules were off, and I had to enable libxml with its enable option.
Hope this helps someone else…
Software engineer and entrepreneur, 16+ years at fast-paced startups across the US, Canada, Germany and India.
Hook this up to your favourite commenting platform — Giscus, Disqus, or your own.
Continue reading
Building a Yii app: The Data Model
A friend of mine needs a web application to be revamped. I had originally created it about 2 years back using a custom PHP mini framework that I had built for m...
Templates with Mustache in JavaScript and PHP
For a long time I have used PHP as the template language with nothing else on top of it. No template engines ever. This was all fine till the point that we want...
Odd error with Redis, PHPRedis, Gearman, PHP
We have a setup for background jobs for all the websites we manage like forums.com, files.com, payments.com, etc. The background jobs play around with lists of...