Create Digital Media

Just another weblog

So, I’m still new to FreeBSD’s ports system. It seems like something that is potentially really powerful, but I’ve got a bit of learning to do.

I had discovered that while I had build PHP with libpng and libjpeg, libjpeg had not built correctly. (I had built libjpeg separately from ports, I believe – it’s been a while since I set this server up so I don’t recall.)

Now, going back in to try to rebuild, in this order:

1. Rebuilt PHP from ports
2. Headed to /usr/ports/lang/php5-extensions and used the very handy UI-based configuration (make config)
3. Tried to rebuild php5-extensions with GD enabled from ports, so that jpeg and png support build with dependencies

The problem: it gets stuck on libxml2, which is a dependency for all of that. Tried portmanager and portmanager -f, which I thought would go through and try to build those dependencies. Same problem. Tried to build libxml2 directly — see below.

And I see from Dr. Google some other folks are stuck on libxml2 builds on x86_64 systems, too, though no clear solution.

I thought that I did want these built as shared libraries, not just static libraries. Maybe the makefile needs some help in ports for 64-bit systems?

Here’s what happens when I try to build libxml2:

===>  Building for libxml2-2.7.3
gmake  all-recursive
gmake[1]: Entering directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3'
Making all in include
gmake[2]: Entering directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3/include'
Making all in libxml
gmake[3]: Entering directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3/include/libxml'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3/include/libxml'
gmake[3]: Entering directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3/include'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3/include'
gmake[2]: Leaving directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3/include'
Making all in .
gmake[2]: Entering directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3'
/bin/sh ./libtool --tag=CC   --mode=link cc  -O2 -fno-strict-aliasing -pipe -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -version-info 5:0:0  -L/usr/local/lib -o -rpath /usr/local/lib SAX.lo entities.lo encoding.lo error.lo parserInternals.lo parser.lo tree.lo hash.lo list.lo xmlIO.lo xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo HTMLtree.lo debugXML.lo xpath.lo xpointer.lo xinclude.lo nanohttp.lo nanoftp.lo DOCBparser.lo catalog.lo globals.lo threads.lo c14n.lo xmlstring.lo xmlregexp.lo xmlschemas.lo xmlschemastypes.lo xmlunicode.lo xmlreader.lo relaxng.lo dict.lo SAX2.lo xmlwriter.lo legacy.lo chvalid.lo pattern.lo xmlsave.lo xmlmodule.lo schematron.lo -lz -L/usr/local/lib -liconv -lm
cc -shared  .libs/SAX.o .libs/entities.o .libs/encoding.o .libs/error.o .libs/parserInternals.o .libs/parser.o .libs/tree.o .libs/hash.o .libs/list.o .libs/xmlIO.o .libs/xmlmemory.o .libs/uri.o .libs/valid.o .libs/xlink.o .libs/HTMLparser.o .libs/HTMLtree.o .libs/debugXML.o .libs/xpath.o .libs/xpointer.o .libs/xinclude.o .libs/nanohttp.o .libs/nanoftp.o .libs/DOCBparser.o .libs/catalog.o .libs/globals.o .libs/threads.o .libs/c14n.o .libs/xmlstring.o .libs/xmlregexp.o .libs/xmlschemas.o .libs/xmlschemastypes.o .libs/xmlunicode.o .libs/xmlreader.o .libs/relaxng.o .libs/dict.o .libs/SAX2.o .libs/xmlwriter.o .libs/legacy.o .libs/chvalid.o .libs/pattern.o .libs/xmlsave.o .libs/xmlmodule.o .libs/schematron.o  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -lz /usr/local/lib/ -lm  -Wl,-soname -Wl, -o .libs/
/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
gmake[2]: *** [] Error 1
gmake[2]: Leaving directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/textproc/libxml2/work/libxml2-2.7.3'
gmake: *** [all] Error 2
*** Error code 1

Testing locally to me is a big deal, all this talk of doing everything in the “cloud” aside. So I’ve begun building the new server infrastructure for CDM’s Next Big Project and Future. I’ve been enjoying working on Ubuntu Desktop, so to me having an integrated workflow that goes from Ubuntu Desktop to Ubuntu Server makes a whole lot of sense. A logical way to test, and to build our server for deployment to Amazon’s EC2 “elastic computing cloud,” is unquestionably to use a virtual machine. Amazon themselves use the Xen hypervisor running under Linux (Red Hat Enterprise Linux, I believe). So, setting up a virtual machine on Ubuntu ought to be really easy, right? Wrong.

I had a string of failures, though don’t worry — it ends happy, and I wind up doubly glad I chose Ubuntu: Continue reading »


by Jaymis Loveday

I’ve just had a little run of spam comments get through Akismet on my personal site.

What differentiated these spam comments from all the others that do or don’t make it through the filters, is that these ones were actually relevant to the content of the article they were posted to.

Track of the Day: Architecture in Helsinki – Debbie
Spam Comment: “What a magnifcent world of clip-making”

Internet Censorship in Australia, AKA the “Clean Feed” – Do Not Want
Spam Comment: “And how can we avoid thi problem in any other way????”

Chilli Jam Recipe
Spam Comment: “It’s a little bit sharp but all in all it tastes delicious.”

Quicksilver Post to WordPress with Title Script
Spam Comment: “Where can I downlod his qicksilver”

If any of these had come through individually I probably would have thought the poster was a standard internet stupid person and not bothered with it, however these came all at once, on a series of completely unrelated posts, which gave them away instantly.

Spammers really are their own worst enemies. I suppose if they were a bit smarter they’d do something productive with their lives.

We’re just about to upgrade Noisepages to WPMU 2.6, so of course it’s backup time!

I use BackupWordpress for various WP sites. It’s quick and clean, and can email backups to us as well! I can now also add “works with WordPress MU” to that feature list.

Also on the WPMU plugin kick: MU’s “mu-plugins” folder is great for plugin functionality which should be available for all MU sites without any user interference, but certain plugins don’t work in there (I managed to completely break a WPMU install by dropping the PXS-Mail plugin in there today), and for some plugins we might want them to show up for new WPMU sites, but be enabled by default.

Enter Plugin Commander, an MU-plugin which lets you control which plugins appear by default, and also which plugins users can activate and deactivate. Very clever, and super useful.

Peter isn’t quite in the habit of sharing our internal CDM research and communiques to the rest of the world, so I’ll re-post his words:

Another caching solution for WP. This story also goes through some of the more generalized performance issues with WP and other solutions…

This is the system they use for

Batcache implements a very simplistic caching model that shields your database and web servers from traffic spikes: after a document has been requested X times in Y seconds, the document is cached for Z seconds and all new users are served the cached copy.

New users are defined as anybody who hasn’t interacted with your domain—once they’ve left a comment or logged in, their cookies will ensure they get fresh pages. People arriving from Digg won’t notice that the comments are a minute or two behind but they’ll appreciate your site being up.

You don’t need PHP skills to install Batcache but you do have to get Memcached working first. That can be easy or hard. We use Memcached because it’s awesome. Once you know how to install it you can create the same kind of distributed, persistent cache that underpin web giants like and Facebook.

Interesting. Will probably be giving this a spin soon.

Since upgrading to WordPress 2.5 we’ve had some issues with certain comments not showing up on the site. These comments exist in the database, they can be edited, and their author details appear, but the actual comment text doesn’t appear on the site.

I’ve tried to troubleshoot this a few times – thinking it may be a mod_security problem, or perhaps just a weird 2.5.1 bug.

Another commenter had his comment eaten tonight, so I went through another round of searching, and eventually discovered this thread on the WordPress forums.

The answer, he is right down the bottom there: “… a plugin designed to remove the rel=”nofollow” attribute”. A.K.A. Dofollow.

So it seems that Dofollow with WP2.5 breaks things, and causes comments to disappear. Very unfortunate.

We haven’t revisited our love for Adobe’s Lightroom for quite a while, but that doesn’t mean that love has diminished. Any photos we’ve taken for CDMo have likely passed through Lightroom’s gentle caress. Flickr, likewise, is indispensable. We use it for hosting larger images associated with CDM stories, and the Flickr pools for both CDMotion and -Music is a great way to keep up on what’s happening in the respective communities.

So a way to get your images from Lightroom to Flickr as quickly as possible is a Good Thing, right? Right! Jeffrey Freidl’s “Lightroom Export Plugin for Flickr” works cross-platform, has all of the right settings available (including adding photos to Sets, or making a new Set), and integrates cleanly so all of your titles, tags and descriptions make it through intact.

And it’s super quick, so there’s one less barrier between the act of creation and the act of sharing it with the world.

Peter and I have been talking about implementing WYSIWYG editing for WordPress comments for a while now. WP’s comments system is reasonably robust, but the HTML instructions seem to confuse some people:

XHTML: You can use these tags: <a href=”" title=”"> <abbr title=”"> <acronym title=”"> <b> <blockquote cite=”"> <cite> <code> <del datetime=”"> <em> <i> <q cite=”"> <strike> <strong>

We quite often receive comments to out sites in which people – probably those unfamiliar with HTML – have taken these instructions to heart and created comments which look a little like this:

You can check it out <a href=”” title=”here”>, more updates should be coming soon.

This can cause issues for the site as a whole: WordPress doesn’t detect this error and close that anchor tag, so the rest of the comment becomes a link, which encompasses everything down the page until the next link in the code is closed. The same kind of thing happens when people put unclosed <strong> tags in their comments. We don’t have any closing </strong> tags in the page source after the comments, so when someone does this the rest of the site becomes emboldened until an administrator corrects the comment.

These kind of errors notwithstanding, WYSIWYG is perfect for comments. I don’t like WYSIWYG editors making decisions for me in my day-to-day coding life, as they rarely output exactly what I want them to, but writing comments is such a constrained activity; with a small number of tags available, the editor can’t really stuff things up too badly.

I’ve previously hacked a cut-down version of TinyMCE into our test bbPress installation. This was relatively simple, so I’d expected that it wouldn’t be hard to get it happening on the WordPress comments form as well. I did a quick search first, though, to make sure I wouldn’t be duplicating someone else’s efforts. It turns out I would be, as there’s a WordPress plugin called TinyMCEComments.
Continue reading »

bbPress is a very stripped down forum system, by default it contains very few of the “accepted” forum functions, such as private messaging, user timezones, even image posting. These functions are all available via a simple plugin system modeled on WordPress, and the ring that binds these plugins is Plugin Browser for bbPress, which hooks into the bbPress plugin repository and installs plugins directly to your server.

This will probably become less useful over time as the plugin load expands, but right now it’s an excellent way to test things out and get some more functionality to our forum quickly.

We’ve been planning to move to bbPress for quite a while. phpBB is plagued with spam, both through spam user signups and to a lesser extent spam postings. Last time I checked there was no serious anti-spam plugins or modifications available, and the couple of hacky attempts to fix the problem were painful to implement and not particularly effecive.

So we’re now seriously on the path to a bbPress migration, there are some scripts around which will convert a phpBB database to bbPress, but our phpBB currently has 7486 registered users, and I’d say about 300 of those are real people. So before the migration, it’s time to remove the spam profiles.

Here’s a great start, it deletes all “members” who signed up over 48 hours ago and are inactive (haven’t clicked the confirmation link in their signup email).

The SQL looks like this:
Continue reading »