"You´ll notice that a lot of variables changed, e.g. $SERVER_ADDR is now $_SERVER["SERVER_ADDR"]"
Not completely true.
$SERVER_ADDR is still $SERVER_ADDR.
But., all the server vars used to be available in $HTTP_SERVER_VARS. PHP have decided to rename that array to $_SERVER.
In 4.1.x, all the old options are still available, but they will be dropped in future releases.
Accessing 'global' variables is never a good idea, always specify where you want to get the value from, because that will work on any installation of PHP:
echo $HTTP_SERVER_VARS['SERVER_ADDR'];
or in 4.1.x:
echo $_SERVER['SERVER_ADDR'];