I am having trouble with scheduling this to run in a standard cron job.
Cron job:
Code:
/usr/local/php5/bin/php /home/myuser/mysite.com/forum/gateway.php
I believe init.php is designed to use a relative path on line 42 and if that fails it grabs the full path from config.php, as shown here:
Code:
// #############################################################################
// fetch the core includes
require_once(CWD . '/includes/class_core.php');
// initialize the data registry
$vbulletin =& new vB_Registry();
// parse the configuration ini file
$vbulletin->fetch_config();
if (CWD == '.')
{
// getcwd() failed and so we need to be told the full forum path in config.php
if (!empty($vbulletin->config['Misc']['forumpath']))
{
define('DIR', $vbulletin->config['Misc']['forumpath']);
}
else
{
trigger_error('<strong>Configuration</strong>: You must insert a value for <strong>forumpath</strong> in config.php', E_USER_ERROR);
}
}
else
{
define('DIR', CWD);
}
if (!empty($vbulletin->config['Misc']['datastorepath']))
{
define('DATASTORE', $vbulletin->config['Misc']['datastorepath']);
}
else
{
define('DATASTORE', DIR . '/includes/datastore');
}
if (!$vbulletin->debug)
{
set_error_handler('vb_error_handler');
}
Unfortunately, even when I specify the full path in config.php the cron job fails. And when I enter the full path in line 42 of init.php, my whole site breaks. I've highlighted the bad path here.
Error:
Code:
Warning: require_once(/home/.saint/user/includes/class_core.php): failed to open stream: No such file or directory in /home/.saint/user/mysite.com/forum/includes/init.php on line 42
Fatal error: require_once(): Failed opening required '/home/.saint/user/includes/class_core.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.saint/user/mysite.com/forum/includes/init.php on line 42
Anyone have ideas?