Just wanted to let you know the USE-Flags I used to install PHP on Gentoo in order for Silverstripe to work:
berkdb bzip2 cgi cli crypt ctype curl exif flatfile ftp gd gdbm hash iconv imap ipv6 mysql mysqli ncurses nls pcre readline reflection session simplexml snmp spell spl ssl threads tokenizer truetype unicode xml xmlreader xmlwriter xpm zip zlib
I just stumbled over the fact, that the trunk (http://svn.silverstripe.com/open/phpinstaller/trunk r101746) needs the PHP built-in function hash_algos() when installing for the first time, which is only included if you have switched on the "hash"-flag -- which I did not.