Search

Friends

Atomspheric CO2 (PPM)

Archives

Blather

Uptime verified by Wormly.com

4 May 2013

Elmo loves mailbox

image

12 March 2013

Integrating Hero Framework accounts with Vanilla Forum using jsConnect

This is something of a hack, but it is pretty quick and easy. I've never used Smarty before, but it's pretty flexible (and slightly evil).

I put this in a Hero template called authenticate.thtml and mapped it to /authenticate. I installed the jsConnect module for Vanilla, set the secret and it was basically done. Seems to work for regular and embedded forums.

{strip}
{assign var=secret value='985d2f9eb57a8b55db3c04c20272bce9308764b0'}
{assign var=client_id value=$smarty.get.client_id}
{assign var=callback value=$smarty.get.callback}

{if $logged_in}
  {assign var=member value=['uniqueid'=>$member.id,'name'=>$member.first_name|cat:' '|cat:$member.last_name, 'email'=>$member.email, 'roles'=>'member']}
  {assign var=empty value=ksort($member)}

  {$member['signature'] = $member|@http_build_query|cat:$secret|@sha1}

  {$member['client_id'] = $client_id}
{else}
  {assign var=member value=['name'=>'', 'photourl'=>'']}
{/if}

{$callback}({$member|@json_encode})
{/strip}

18 January 2013

Argo

This is my review of Argo, although just written by someone else.

And the winner is … Islamophobia

30 December 2012

Excluding men’s shorts

Excluding men's shorts

25 December 2012

Found your car in river

Found your car in river

Some folks I know had this left on their car one time. The back story kind
of tells itself

Privilege Club

Privilege Club

I feel like I've already seen this exact thing in some anti-oppression
spoof zine somewhere. Are these guys for real? A "privilege club"?

Run!

Run!

This ad does not make me want to live there.

20 December 2012

Adam & Steve

It was Adam and Eve, not Adam and Steve

You don't hear this one so often these days, but for a while it felt like the theological backbone of a lot of Christian anti-homosexual sentiment. It always annoyed me. Rhyming two words together is awesome and funny, but it does not constitute a defence of totalitarian heteronormativity.

5 December 2012

Condensed Soymilk

Condensed Soymilk

3 November 2012

Build your house on the sand

It turns out you can build your house on the sand after all. I'm not sure what the consequences of discovering this are for my faith.

Loose sand will provide allowable bearing pressures up to 100 kPa. This conforms with the minimum requirement for bearing pressures of 100 kPa pursuant to AS 1684 Section 2 and AS 2870 Clause 6.5.2(a).

13 October 2012

Giant Chocolate Freckle

Giant Chocolate Freckle

29 August 2012

Template Errors with Hero CMS

Just had an issue with Smarty choking in Hero CMS. It said it couldn't find the frontpage.thml template. After trawling through Hero, CodeIgniter and Smart code I finally found out that there needs to be a writeable/template_compile directory or Smarty initialization will silently fail (until you need it).

25 August 2012

Finished stove

Finished stove

21 August 2012

Infinite redirect loop on Drupal taxonomy pages

Weird problem... took months to figure out because I'm a bit slow. All taxonomy pages were doing infinite redirect loops if you were logged in, and sending users to the login page if you were logged out. So it was totally broken. In the end the problem was the "demo" taxonomy view that gets packaged with the Views module. It was on (although it seemed without any modifications) and turning it off solved the issue. I spent a long time trying to figure out what was wrong with the view itself and eventually gave up.

18 August 2012

School closed by poo dramas

School closed by poo dramas

This is for Robert

Pizza oven for mum

Pizza oven for mum

25 July 2012

Fluffy Hair

Fluffy Hair

19 July 2012

Quaffing Wine

Quaffing Wine

17 July 2012

Cafe open as normal

Cafe open as normal

25 June 2012

Slow performance hosting Symfony2 on cPanel/WHM

We've recently set up cPanel on VPS to host our big Symfony2 project. We were developing locally on a MAMP setup which was really fast. For production, we moved initially to a FastCGI shared host which was fairly fast as well. But to get PHP 5.3 we needed to make a few messy fiddles we weren't that happy and they didn't have APC. So we finally moved to a VPS so we could have PHP 5.3 with mod_php and whatever other guff we needed.

However, the system was incredibly slow. Between 50% and 30% of the speed of our local development server (which wasn't anything flash). We tried a bunch of combinations of memcache and APC configurations and then tried a few different Symfony2 options but nothing made much difference. In the end it turned out to be the open_basedir option that is normally on with cPanel accounts. This disables fstat caching, and Symfony2 does a LOT of fstat calls. Turning off open_basedir solved the issue and reduced page generation times from about 1500ms to 600ms. Which may not be an option for everyone.

See https://bugs.php.net/bug.php?id=52312.

0.326 seconds