How to handle sfError404Exception

The problem: Let’s say you need to migrate old website to you new Symfony app. You want to keep all old links working. When they do not match the new link scheme, you want to redirect with 301 (or 302) to correct page in the new URL scheme. All these can be managed via backend [...]

How to set default value or option in the Symfony embeded form inside the Action

Let’s say you have Symfony 1.4 form User with embedded form Entry class UserForm extends Something { public function configure() { $this->embedForm(’entry’, new EntryForm()); } }

bash: /usr/bin/kvm: No such file or directory on Gentoo

After updating my Gentoo host machine yesterday with emerge -avDNu world, which included update of kvm from app-emulation/qemu-kvm-0.13.0-r2 to app-emulation/qemu-kvm-0.14.1, I wasn’t able to boot my guests systems any more. So first thing I did was emerge qemu-kvm. It turns out that it doesn’t help – kvm file is still missing. gentoo1 ~# ls -l [...]

MySQL FROM_UNIXTIME and UNIX_TIMESTAMP functions in PostgreSQL

Personally I prefer PostgreSQL over MySQL DBMS. However there are some things I miss in PostgreSQL. Here is an advice on how to use MySQL FROM_UNIXTIME and UNIX_TIMESTAMP function in PostgreSQL DBMS.

What’s the average length of an email address?

This question always comes up, when you have to design new table in database to store email addresses. Is VARCHAR(30) long enough? Or maybe you should use VARCHAR(255) or maybe TEXT as I’ve seen in some projects? My live database, which I’ve used for this test contains 92298 valid email addresses, verified with the Pear [...]