UDF to strip certain chars, but leave UBB tags alone
We are developing a commenting system which is supposed to discourage comment spam by making comments more or less unreadable when they crossed a certain threshold of negative ratings. We decided that we'd like to strip all vowels from the text, though we'd like to keep the UBB-style tags inside the comment unchanged.
You'll find that this last bit makes the whole task a little more complicated than just a simple Regex-Replace. We'll need to use a negative lookbehind, then mark the characters we do not wish to strip, then remove any "unmarked" characters and finally remove our marker.
CF Instance Hangs, “too many open files” in Log
This is really quite trivial, but may be of some interest to people who don't know too much about Linux OS tweaking. Today our dev-server instance was hanging - again. Only this time I took the liberty to make our developers wait a little longer before I restarted it, so I could actually diagnose the issue and resolve it for good. As only one of our two instances was hanging, I took a peek into its logfiles first - but couldn't find anything out of the ordinary. And the Enterprise Manager reported the instance to be running, too.
ColdFusion 8 and Symlinks – Hell Awaits? (solved)
UPDATE: The issue seems to be fixed with ColdFusion Hotfix hf801-71648 (see technote kb403629). The fix is included in the Cumulative Hot Fix 2 for ColdFusion 8.0.1 (see technote kb403781). My bad - I thought I had deployed the hotfix when all I had in fact done was upload the zip-file instead of the jar. Epic fail. Anyway, the technote is a bit misleading as well - it's talking about Application.cfm path resolution when the same issue applies to cfinclude, too.
UPDATE 2: This hit us today again. I usually download the ZIP-Archives of the updates and just unzip then in place before restarting coldfusion. For some reason two of our five CF-servers decided to include chf8010002.zip into their classpath instead of the chf8010002.jar that was sitting right next to it. I cannot imagine how CF decides that a ZIP-file would be a valuable addition to its classpath, but only after I simply removed the original ZIPs and restarted the server, the JAR was correctly included and the annoying symlink resolving went away.
I recently stumbled over an issue when using symbolic links on a couple of ColdFusion applications. I intended to use symlinks to keep duplicate code between different applications to a minimum. I'm running Apache 2.2 with ColdFusion 8.0.1 on 64-bit Debian Etch. Each of our web-applications needs a "connector" while retaining an include with some site-specific config.
Dynamic Templating with ColdFusion
"Hey, what's this? ColdFusion is using dynamic templates, didn't you ever come across one of them .cfm-files?" Ah, but this is not what I'm talking about here. I'm talking about clean HTML-snippets with some placeholders in them, so you, the programmer, can hand the design task to somebody who finds beauty someplace else than in a brilliant piece of code. These people are called web designers and while they can do all sorts of magic with HTML, CSS and Photoshop, they get tend to be irritated by long blocks of cfscript, queries and other business logic in their template code.
I'm a server side coder - I don't make pretty. (Raymond Camden)
So this is about separating this business logic from the real HTML template.