Moving Joomla, WordPress and other PHP/FastCGI apps to Nginx

Have you moved your site from Apache to Nginx and now your FastCGI (php-cgi/spawn-fcgi) processes die/hang/crash periodically and your users see “HTTP 502 Bad gateway” or “HTTP 504 Gateway timeout” instead of a website?

I have faced this problem and found a relatively simple and robust solution. Here’s how I did it on Ubuntu 9.10 (Karmic Koala) and 10.04 (Lucid Lynx) server edition.

Continue readingMoving Joomla, WordPress and other PHP/FastCGI apps to Nginx

Informal notes from #frozenrails 2010

Thanks to organisers from Kisko Labs and the HHLinuxClub on Friday, May 7th, 2010 Finland got its first  Rails conference.

Conference has drawn very interesting speakers and  international crowd – from Finland (naturally), Sweden, Poland, Germany, Russia and other countries. I made a few notes from selected talks on the conference.

Chris Wanstrath / GitHub (@defunkt)

  • Slides: http://www.slideshare.net/err/inside-github
  • Linus Trovalds Google tech talk about git – where Linus tell you that you’re stpid if you’re not using git
  • rack-mobile-detect – is used by GitHub, super useful if you’re planning to create mobile optimized version
  • GitHub uses Unicorn as an application server – personally I’m not sure if that’s better than Apache + Passenger. Chris tells that Unicorn is cool, because does fair load balancing on Linux kernel level, also Rails are loaded only once – and then required number of processes are forked – and this is very fast, a lot faster than loading rails separately for each Mongrel. And when one of the processes dies – there’s no need to re-load Rails, but just fork another process.
  • GitHub users BERT to forward requests to one of their six servers – BERT to Erlang is the same as JSON to JavaScript
  • GitHub doesn’t use delayed_job anymore since they needed several queues with different priorities – so far they use resque, but are considering developing a real queue management system

Continue readingInformal notes from #frozenrails 2010

Setting up Ruby, Rails, Git and Redmine on Dreamhost

The task is to have:
– Redmine installation on redmine.mydomain.com
– Several Git repositories on git.mydomain.com with different access rights to each one

This proved to be a non-trivial task. There is a number of tutorials on the net, but none of them described the full solution. So after getting it all to work, I decided to share all the tips and tricks. Feel free to comment, if you will find problems with the following set of instructions.
Continue readingSetting up Ruby, Rails, Git and Redmine on Dreamhost

Introducing Moozement

Last year I got involved in the development of a new social network – Moozement. There are plenty of social networks out there, there are even white label social networks. So why create another one?

Jyri Engeström wrote some time ago about the case for object-centered sociality: “‘social networking’ makes little sense if we leave out the objects that mediate the ties between people”. I could not agree with him more. The glue of each community is something that unites them – common interest, social object. When you join new social network, you typically start by building your social graph – re-establishing links to the real people you know, checking if they have already registered, inviting those whom you would like to see in the new environment. But there must be something beyond the initial phase of building the social graph. And this is the problem that haunts giants like Facebook and MySpace. You cannot possibly have common interest with everyone, and you don’t want to share the same things with everyone.

Continue readingIntroducing Moozement

I have been hacked

Yes, for the second time in my life. First time it was still in my university years. In those times if you had internet access at home, you were priveleged. Companies were paying quite a lot of money to get a slow 28K dial-up connection, and internet providers were charging per minute, not by gigabyte. …

Radiant CMS

Easter weekend didn’t start well – I decided to upgrade Joomla on one of my sites to version 1.5.1 from 1.0 and upgrade just totally ruined the entire site – content was lost, template wasn’t compatible with version 1.5.1. At first I thought that the reason is Dreamhost‘s automatic one-click upgrade that I used, but …

Google Android vs. Nokia Series 60 – what would it take to build a better mobile phone?

The long awaited Google phone turned out to be just an OS. What does it mean for us, mobile software developers?

Personally, I think this is great news. An open mobile platform is something that was long due to stir up the world of RIM-Windows-Symbian.

Android managed to get many things right from the very beginning, things that took several years for S60. While S60 initially took Microsoft-style approach to development community – with multi-level support, exclusive club membership with access to the source code, signing and licensing, Android is quite open and democratic.

When Google announced Android SDK – my first thoughts were – it’s a smart move to release SDK before devices are available. Google’s name alone would be enough to attract developers and hackers to this new platform, so they can create a developer community by the time devices are shipping. Then Google announced developer challenge with $10mln in awards.

Continue readingGoogle Android vs. Nokia Series 60 – what would it take to build a better mobile phone?

Safari, Safari and Opera on 3 mobile devices

Jonathan Green in his video post Browser Comparison: iPhone vs. Nokia N95 and N800 compared performance of Nokia S60 web browser, N800 Opera browser and iPhone Safari browser. Jonathan’s conclusion “my preference is for how Safari handles things over Opera” resonates with my own thoughts in “Opera Mobile vs. Nokia S60 browser – new browser …