Archive

Posts Tagged ‘web development’

Creating a multilingual website

August 24th, 2009

Goal: To find a lightweight, multilingual CMS that I can deploy on a server running Lighttpd and FastCGI. Every page in the CMS should have multiple versions, one for each language, with the ability to easily toggle between them.

Solution: Wordpress + qTranslate (Update: see note below).
Read more…

Aidan Findlater Impersonal ,

A simple, one-job PHP/cron dispatcher

April 22nd, 2009

Goal: To provide a way for a website administrator to dispatch a long-running command-line program, one that might take hours to complete (so exec is out). The admin interface should show that the process is running. There is only one job that will ever be dispatched.
Read more…

Aidan Findlater Impersonal , , ,

Firefox, cookies, and localhost

March 13th, 2009

Firefox 3 was ignoring a cookie being set by an application running on localhost. The Safari 4 Beta on the same machine had no problems whatsoever.

Using Firebug’s console to set the cookie using the Javascript console, the problem was isolated to the domain of the cookie. Removing the domain specifier (‘localhost’) fixed the problem. Using the mDNS name of localhost also works. Why this is an issue for Firefox, and Firefox only, I don’t know.

Aidan Findlater Impersonal , ,

Decrypted JSON data not being decoded properly

March 6th, 2009

Summary: The decrypted string was was null-padded. These null bytes are not handled by the json_decode function. It is easily solved by running $string = rtrim($string, "\x00"); before decoding.
Read more…

Aidan Findlater Impersonal , , ,

Wordpress plugin Contact Form 7 and line breaks

February 18th, 2009

Summary: Contact Form 7, a Wordpress plugin, automagically adds line breaks (<br />) to the outputted HTML. To disable it, set define('WPCF7_AUTOP', false); in wp-contact-form-7.php.
Read more…

Aidan Findlater Impersonal , ,