pxnx

ZendFramework mystery failures caused by PHP iconv problems on Solaris

Recently been dealing with mysterious failures of some ZendFramework components – namely Zend_Pdf and Zend_Search_Lucene – resulting in empty output.  For Zend_Pdf it manifested as, well, blank PDF documents.  For Zend_Search_Lucene, we got indexes full of documents with empty fields, or total failures to return query results from valid indexes.  Hopefully this post will make it onto the internets with some of the search terms I used in a futile attempt to google up a solution, so that others can get around to solving the problem in less time than it took me.

Read the rest of this post »

Custom logging to a database with PHP and Apache

My organization needed a way to create several types of persistent database-stored logs for our PHP website, where each log entry would record which user was requesting the resource.  We decided we would try for a solution that did not require us to do a database insert for every page view, for obvious reasons.  Here is what we came up with.  Our environment is PHP5 and Apache 2.2.

Read the rest of this post »

Relaunching and retooling for Habitat for Humanity of Oregon

Habitat Oregon is an umbrella support organization “created to offer fundraising, public relations, and advocacy support to all 34 Habitat affiliates – the groups of dedicated staff and volunteers building the homes – across our state.”  We are proud to support Habitat in Oregon, and to offer our small measure of help by launching the newly retooled habitatoregon.org — with new WordPress-powered content management capability, a blog, and an online forum for Habitat affiliate employees throughout Oregon.

Thanks, Habitat for Humanity of Oregon, for the opportunity to lend a hand!

Flexigrid jQuery plugin: extending to allow sorting of static grids

Flexigrid is a nice lightweight jQuery plugin that turns tables into sortable, searchable, data-driven grids.  It’s all ajaxed up to the hilt, like every other jQuery plugin, but it can also create a quick nice-looking grid from a plain ol’ HTML table.

Out of the box, though, its column sorting feature does not work unless your grid is hooked up to a server-side data source.  Here is a svn patch that adds this functionality to the current head branch of flexigrid.js:

flexigrid-sort-in-place.diff

This patch is built on the current trunk revision of flexigrid.js, which is r3.  I am currently unable to create a patch for the current release version (“1.0b3″), which is slightly different; but to apply these changes to that version is pretty simple, since I only made 3 changes:

  1. add “sortorder: ‘asc’” to the default properties struct up at the top
  2. add the “else if (!p.url) this.inPlaceSort();” clause to the end of the changeSort method
  3. copy in the inPlaceSort() function

HATE. DNS.

A short play in one act.

Nick: <typing carefully>

Nick:  <clicks button>

[some time passes]

Internet: “Oh, sorry, no trailing period? I’ll just assume you mean to send this
email to freakin Nepal. MORON.”