Gallery requires PHP 5.2.3 or newer (you're using 5.1.3RC4-dev)