FatLab Music logo

Archive for the ‘Software’ Category

Page 2 of 4

How-to Fix WP HTTP Error: name lookup timed out

This blog and the Snowferno site both run WordPress on separate but identically-equipped Lunarpages servers. When I went to apply today’s WordPress 2.8.4 upgrade, one install was giving me “WP HTTP Error: name lookup timed out” messages and no upgrade button, while the other worked just fine. There are some workarounds detailed on the WordPress support site, but I wasn’t happy having to disable cURL on one host and not the other. It had to be something else…

The problem for me was caused by lines 1276-1277 of the WP_Http_Curl request() method in wp-includes/http.php:

1276
1277
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $r['timeout'] );
curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );

I commented those lines out and threw in a line of debug code on line 1325 (after the curl_exec call)

1325
print_r(curl_getinfo($handle));

and tested the cURL transport using Core Control. I found that my requests were simply taking longer than the timeout provided. I don’t know quite why, except to guess that one server must be just more swamped than the other.

Buy Snowferno. $1.99 on the App Store
I fixed it by building myself a little plugin that adds an action for the 'http_api_curl' action called on line 1315.

After enabling this fix, WP showed the 2.8.4 upgrade button on the Dashboard page, but the WordPress Development Blog and Plugins RSS feed boxes still showed timeout errors. So, I looked further and found a filter that catches and can modify $r['timeout'] in the WP_Http request() method on line 237.

Here is my barebones plugin code, which overrides all timeouts to a massive 15 seconds:

//adjustments to wp-includes/http.php timeout values to workaround slow server responses
add_filter('http_request_args', 'bal_http_request_args', 100, 1);
function bal_http_request_args($r) //called on line 237
{
	$r['timeout'] = 15;
	return $r;
}
 
add_action('http_api_curl', 'bal_http_api_curl', 100, 1);
function bal_http_api_curl($handle) //called on line 1315
{
	curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 15 );
	curl_setopt( $handle, CURLOPT_TIMEOUT, 15 );
}

I recommend you make sure this does not cause any other issues for your WP install. If you know how to make this code into a plugin, then you are capable enuf to be responsible for any adverse fallout. :) I only know this solved my immediate problem while still maintaining cURL functionality.

New site design launched at benbritten.com

Our pal and Snowferno collaborator, Ben Britten Smith, asked me a while (weeks?) ago to port his website and blog over to a 100% WordPress-powered site. After we submitted the Snowferno build to Apple, I got working on it, and here’s how it turned out:

benbritten.com homepage

new benbritten.com homepage

Ben had previously rolled his own mini-CMS, but had started wanting to unify his site content with his K2-themed blog. Ben’s site is also his portfolio site, so I wouldn’t have normally gone 100% WordPress. But after becoming familiar with the family of WooThemes premium themes for the Snowferno site, we selected the VibrantCMS theme and I went about the business of porting his content over to the new site. Through a little bit of backend category magic, many of the WooThemes manage to separate the blogginess of WordPress Posts from the CMSness of Pages. I’m sure a whole host of plugins would have done something equivalent, but this way it came all built-in to the theme. We also weren’t quite ready to learn a whole new platform like Drupal or Joomla just for a cosmetic upgrade.

And who’d have thought I’d ever buy a theme for WordPress when there are so many good free ones out there. But the thing I do love is the profit motivation keeping WooThemes well-maintained. Just today I found and applied a big update to the VibrantCMS backend. After you consider how many hours they saved me just by including a new IE 8 stylesheet, you can hardly justify not using premium themes.

I needed to map his old URLs, so .htaccess handles routing the old blog permalinks from http://benbritten.com/blog/ up a level to the root http://benbritten.com/. Then since his old CMS used a querystring scheme similar to WordPress, I had to use the Redirection plugin to catch those incoming links.

RC2 of Snowferno out to beta testers – maybe final build?

If we don’t find anything tragic in this build, we’re gonna submit the current beta (Release Candidate 2) OF Snowferno to the App Store.

I searched the App Store for “hell” and came up with a slew of gory and disturbing games, which we’re certainly not. As long as that concept is okay for the store, I see no other reason we would be denied. But, still we’ll have our fingers crossed. It’s our first app, our baby!

In the meantime, the Leaderboard is completed and live. I’m actually quite proud of my own scores. (In spite of the fact that I knew *how* to solve most of the puzzles, you still have to *do* it. It’s more challenging than it seems!) And here’s another trailer:

Read more on our Snowferno development blog:
http://www.snowferno.com/2009/07/22/rc1-crasher-rc2-now-released-to-testers/

Snowferno iPhone Game Beta Released Tonight

Our first foray into the world of iPhone Apps officially entered beta tonight.

It’s Monday morning in Melbourne, Australia, where Ben just posted the first beta build (b0.9.2) to the Snowferno website.

If you want to play the game before anyone else — for free! — let us know:
http://www.snowferno.com/2009/05/18/beta-testers-wanted/

We’ll be able to add new device IDs in a week or so. Barring any huge bugs, we are aiming to submit to the App Store in about 10 days.

Snowferno.com is live

The website for our upcoming iPhone game collaboration with Ben Britten is now live. Check out snowferno.com for details, screenshots, development blog, and hear some clips from the soundtrack.

You’ve heard the saying — but where did it all begin?
Who was that snowball, and what exactly was it doing in Hell?

Snowferno is a new take on the classic marble roller game – set (very) loosely in the 9 rings of Dante’s Inferno, with 20 puzzle challenges & starring the original “Snowball-in-Hell”.

Programming and artwork are by Ben. Mike and I are writing the music and designing (most of) the levels. We are nearing a beta release and hope to hit the iTunes App Store early July.

Airfoil Speakers Touch app is a great tool for iPhone devs

As I wrote previously, Rogue Amoeba’s just-released iPhone app “Airfoil Speakers Touch” is a slightly baffling piece of software with limited use in practice. I don’t think much of the criticism it is getting on the iTunes App Store is their fault tho, and the upcoming 3.0 SDK features may let Rogue Amoeba finally create what users think this app will do (and what they really want — Airfoil for iPhone!). But, for now, it’s baffling.

As a composer embarking on scoring my first iPhone game, however, I now see a tremendous use for this. Our audio system has great studio speakers, but iPhone music has to be optimized for audibility over the tiny phone speaker as well. Instead of the laborious “export, mp3, copy to iTunes, sync, iPod play” routine, I can simply hijack Live or DP and beam the audio to my phone. Tweaks made on-the-fly are immediately heard.

A phone call will still interrupt the audio with no option to resume, and I still can’t control the host from within the app… but it did just make my workflow much simpler.

Airfoil Speakers Touch released for iPhone and iPod Touch

Rogue Amoeba has announced the release of Airfoil Speakers Touch, a free companion app for their cross-platform audio streaming tool Airfoil. This app gives any iPhone or iPod Touch the ability to receive streaming audio from an Airfoil app on your local wi-fi network. It’s a free dowload on the iTunes App Store. Airfoil is required and a free demo can be downloaded from Rogue Amoeba. Licenses (which remove the 10 minute time-limit) are $25.

A while back I wrote about my 4-part solution to stream audio across a network and still have your listening count. It’s oddly become one of our highest traffic posts, currently ranking #7 in a Google search for “airfoil iphone“.

My hunch is that most people want a way to broadcast *from* their mobile device to another person’s audio system — a wireless patch cable.

With this app, you still can’t stream *from* your iPod Touch/iPhone in the same way that Airfoil does — it is receive-only. (I guess it would be good for like an office-wide “radio” station (see update below) or something?) Also, since you only receive audio while the Airfoil Speakers Touch app is open, you can’t use Remote to change the song at the music source either.

But maybe if you had one phone running Remote controlling an iTunes streaming thru Airfoil to *another* iPhone receiving…..

'Airfoil Speakers Touch' at the iTunes App Store

Get 'Airfoil Speakers Touch' from the iTunes App Store

I think we’ll have to wait for some of the features coming in iPhone 3.0 before streaming off the phone will be possible. I’m sure if *I’m* getting the Google hits on this, Rogue Amoeba surely is as well and will be on top of things.

UPDATED: I’ve played with this a little more now, and I can’t see much use for it. Perhaps if you were stuck with a crappy PC that had no sound card or no headphones jack, this would give you remote wireless headphones via the phone. And because you have to launch the mobile app before Airfoil can broadcast to that destination, my idea of joining a “radio station” wouldn’t be possible. Using this app out-of-reach of the Airfoil source would just get annoying. Third, a phone call properly silences the incoming music, but that results in audio reverting to the host computer’s speakers… hope that’s okay in your quiet office! Oh, and it doesn’t automatically reconnect (yet?) when the phone call is over.

I love Rogue Amoeba’s apps, but Airfoil Speakers Touch feels like they are just cutting their teeth on the iPhone SDK for when bigger and more useful companion apps become possible.

Previously:


Performance Optimization WordPress Plugins by W3 EDGE