Just thought i'd post a change I made to the chdir part of this code. It means you don't have to worry about putting in the folder structure of your host, the code will figure it out for you.
PHP Code:
//Change chdir to fit where your forum is.
$real_path = realpath("index.php");
$real_path = dirname($real_path);
chdir("$real_path/forum/");
require('./global.php');
require('./includes/functions_user.php');
chdir("$real_path/");
I've not been using php for terribly wrong so I don't know if there would be problems with this on some people's hosting. If so, let me know as I'd be interested to find out what they are.