VMWare and Ubuntu: ACPI: I/O resource piix4_smbus error on boot

After installing a brand new Ubuntu 64bit on VMWare i got the message:

ACPI: I/O resource piix4_smbus [0x1040-0x1047] conflicts with ACPI region SMB_ [0x1040-0x104b]

Resolved this by adding

blacklist i2c_piix4

at the end of /etc/modprobe.d/blacklist.conf

read more

share

Coldfusion - Amazon S3 upload via Form POST example

Amazon S3 is a great way to store files that need to be exposed on the web. Every uploaded file can be accessible to the public or accessible to authorized users only via a clever system of expiring signatures.

Joe Danziger wrote an excellent CFC to do all kinds of operations via the S3 REST interface.

The only missing part is the new way Amazon is offering to upload files without the need to first buffer them on your own server.

read more

share

Apache like redirect for a location in Nginx

In Apache i used something like:

Redirect permanent /images/ http://www.s3-imageserver.com/myimages/

to redirect a certain direcotory to another server.

In Nginx there is no redirect, so we gotta use something like:

location /images {
  rewrite /images/ http://www.s3-imageserver.com/myimages/ permanent;
}

read more

share

ColdFusion function to convert a query to JSON

UPDATE 12/29/2012: Please check the “How to convert a SQL query to a JS object” post for a much better way to handle SQL queries that need to be converted to Javascript objects.

read more

share

ColdFusion - Connection timeouts on bulk cfhttp requests on Windows

While pumping lots of records / docs / bulk inserts to the new CouchDB Server I got a mysterious connection timeout that appeared always after about 4000+ inserted records.

read more

share

ColdFusion locale problem with SerializeJSON and date fields

While playing around with CouchDB, ColdFusion and SerializeJSON i found that the SerializeJSON does not honor the SetLocale setting. It will use the “Java Default Locale” which is set for the JRE.

read more

share

Nginx and Coldfusion - Using Nginx as a reverse proxy for more performance

The usual setup is ColdFusion on either Windows with IIS or on Linux with Apache.

Both webservers are great webservers unless you get excessive load on them. At that time you wish that you had one server to do all the static files and one or more servers to do the ColdFusion requests.

read more

share

How to start Memcached on ColdFusion startup

Coldfusion 9 offers a nice new feature: the server.cfc.

The server.cfc can be enabled in all CF editions to be called once the server starts. Much like a bootscript or the good’ol autoexec.bat from MS-DOS.

read more

share

Coldfusion CFHTTP DNS Cache Settings

Just found out after 2 hours of debugging that Coldfusion / Jrun does never refresh its DNS cache. I was trying to aggregate several RSS feeds and one feed, even though I knew it was there, was constantly throwing errors that I could not explain. Obviously that site, which was in the DNS query cache of the JVM, was moved to a new location and Coldfusion still tried to get it from the old IP. Turns out Java is setup by default to cache the DNS results forever.

In your Coldfusion directory go to runtime/jre/lib/security and open the file java.security. Now look for a line networkaddress.cache.ttl and set it to a positive integer. I set the cache TTL to 6 hours (21600s).

Restart your Coldfusion server to enable the new setting.

read more

share