If you note the details above, it's unsupported. I didn't write this, but pulled a few similar bits of code I found to get it working for me and thought I'd share.
@MamboCube, do you have the rest of the code that allows it to connect to the VB database in that page as well? The code you gave is the same as mine, but it's missing the calls to VB...
Code:
chdir("forum/");
require('./global.php');
chdir("../");
(your folder names and paths may be different)