Sorry for the lack of posting. You’ll notice a few posts that have stacked up over the last few weeks. I had a few technical difficulties that I had to recover from, and with a full-time job and 3 kids at home, I don’t have a lot of time for diagnosing tech problems.
I recently had decided to play with Ruby and Rails, so I upgraded a few packages on my FreeBSD system to be able to deploy some toy applications I was writing as a learning exercise. Unfortunately, at some point along the way I broke something, and WordPress started giving me “Fatal error: Call to undefined function: xml_parser_create()”. I tried using Flock to post, and it gave me the same problem, although I had to turn on error logging and look at “blog.log” to see it.
I started doing some digging, and found that xml_parser_create() is part of the XML extension to PHP, so I tried rebuilding that – no dice. Then I updated all my ports, and tried again. Now it won’t even compile. The error is:
libtool: ltconfig version `' does not match ltmain.sh version `1.3.5-freebsd-ports'
Hmm. Google didn’t help on this one. I tried rebuilding PHP 4.4.6, but that failed as well. Googling that problem again didn’t help. Hmm.
After still more digging, I figured out that I’m running FreeBSD 4.1, which has recently been End-of-Lifed, so the ports are no longer guaranteed to work. Arrgh! Now somewhere I’m going to have to find time to upgrade to FreeBSD 6.
I still needed to fix the problem, so I tried using the packages system and installing some old versions of the packages. That totally screwed up everything, so I quickly backed that out.
I went back to the beginning and turned on PHP error logging. When I restarted Apache, I got this in the error log:
PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/xml.so' - Shared object "libexpat.so.5" not found in Unknown on line 0
Now I’m getting somewhere – the library is just not found. I found libexpat.so.6, but not 5. After rebuilding libexpat, I found that the version 2 I have, which I must have upgraded to as part of the Ruby/Rails install, is the .6 library version. I couldn’t easily find the .5 version, but Google pointed me to a great idea. Just symlink the .6 version to .5 to fool PHP. Bingo! It works!
System administration can be a pain – I admire those who do it for a living. I do it once in a while, just so I remember how painful it is sometimes. Now, to post a few entries that have stacked up.