you could also add more info to your querry, like the protocol, which is generally http :
$bitcoin = new Bitcoin('myusername','mypassword','myip','8332', 'http');
$bitcoin->getinfo();
// You can do a small test here
$test = $bitcoin->getinfo();
echo $test;
?>
.conf :
maxconnections=15
server=1
daemon=1
rpcuser=myusername
rpcpassword=mypassword
rpcclienttimeout=60
rpcport=8332
rpcallowip=localhost or 127.0.0.1 (unless you want to query it from a remote computer, if so, just enter the ip address)