Could you try replacing this block
$here = substr(realpath(dirname(__file__)),
strlen($_SERVER));
// Determine the path in the URI used as the base of the osTicket
// installation
if (!defined('ROOT_PATH'))
define('ROOT_PATH', str_replace('\\', '/', $here.'/')); //root path. Damn directories
with this one
#Set Dir constants
$root = str_replace('\\', '/', realpath(dirname(__file__)));
$root2 = str_replace('\\','/', $_SERVER);
$path = '';
while (strpos($_SERVER, $root) === false) {
$lastslash = strrpos($root, '/');
$path = substr($root, $lastslash) . $path;
$root = substr($root, 0, $lastslash);
}
// Determine the path in the URI used as the base of the osTicket
// installation
if (!defined('ROOT_PATH'))
define('ROOT_PATH', $path.'/'); //root path. Damn directories
You can remove the var_dump line as well