bitcoind getinfo or getbalance freeze
Usually this type of conf file works :

server=1
daemon=1
rpcuser=any_username
rpcpassword=any_password


if not then allow ip 127.0.0.1 in bitcoin.conf 

rpcusername=your_usename
rpcpassword=your_password
allowip=127.0.0.1
allowport=8332


This may help, you may also try allowing ip 0.0.0.0 if both of the above does not works