Log in

View Full Version : Have a problem with my archive


Leon44
07-01-2009, 05:12 AM
Im getting this error at the bottom and when i click on a link, nothing happens.


Fatal error: Call to undefined function exec_header_redirect() in /home/gamelair/public_html/gameforums/archive/index.php on line 34

Any ideas how to fix this?

Any help would be very appreciated.

xGriffin
07-01-2009, 07:07 AM
Can you give us the code on line 34 in archive/index.php? Thanks.

DragonBlade
07-01-2009, 07:34 AM
@xGriffin, this is the lines.


if (SLASH_METHOD AND strpos($archive_info , '/archive/index.php') === false)
{
exec_header_redirect($vbulletin->options['bburl'] . '/archive/index.php');
}



Let's see... Leon44, in your /includes/functions.php, you do have the following function, correct?
// ################################################## ###########################
/**
* Halts execution and redirects to the specified URL invisibly
*
* @param string Destination URL
*/
function exec_header_redirect($url)
{
global $vbulletin;

$url = create_full_url($url);

if (class_exists('vBulletinHook'))
{
// this can be called when we don't have the hook class
($hook = vBulletinHook::fetch_hook('header_redirect')) ? eval($hook) : false;
}

$url = str_replace('&', '&', $url); // prevent possible oddity

if (strpos($url, "\r\n") !== false)
{
trigger_error("Header may not contain more than a single header, new line detected.", E_USER_ERROR);
}

header("Location: $url", 0, 302);

if ($vbulletin->options['addheaders'] AND (SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi'))
{
// see #24779
header('Status: 302 Found');
}

define('NOPMPOPUP', 1);
if (defined('NOSHUTDOWNFUNC'))
{
exec_shut_down();
}
exit;
}

--------------- Added 1246437386 at 1246437386 ---------------

Also, did you by any chance comment out or delete these two lines in /archive/index.php:require_once('./global.php');
require_once(DIR . '/includes/functions_bigthree.php'); (should be about Line 25-ish)