I realize this isn't a specific vbulletin issue, but I'm pulling my hair out trying to determine why I can't include global.php ouside of my forums directory.
I'm attempting to include global.php in my index (as well as a few other files) so I can load forum stats. This is my php:
Code:
$curdir = getcwd ();
$forumpath = './forums/';
chdir($forumpath);
include('./global.php');
chdir ($curdir);
permissions:
Code:
ls -al forums/global.php
-rw-r--r-- 1 www-data www-data 2071 Jan 2 05:56 forums/global.php
This isn't working for some reason. I can connect to the db without using the global.php just fine:
Code:
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db", $con);
If anyone has some ideas, I would be most grateful. Thanks.