Fatal Error?

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 31, 2011   (RSS)

Warning: require_once(../login/lib/viewer_functions.php) [function.require-once]: failed to open stream: No such file or directory in /home/apexsocc/club_ambassador/pages/ambassadortools.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../login/lib/viewer_functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/apexsocc/club_ambassador/pages/ambassadortools.php on line 2



---------------------------

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php


// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($linksRecords, $linksMetaData) = getRecords(array(
'tableName' => 'links',
));

?>
<?php


// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($templatesRecords, $templatesMetaData) = getRecords(array(
'tableName' => 'templates',
));

?>
<?php


// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($travelRecords, $travelMetaData) = getRecords(array(
'tableName' => 'travel',
));

?>
<?php


// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($formsRecords, $formsMetaData) = getRecords(array(
'tableName' => 'forms',
));

?>
<?php


// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'perPage' => '4',
));

?>

<?php


// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($accountsRecords, $accountsMetaData) = getRecords(array(
'tableName' => 'accounts',

));
$accountsRecord = @$accountsRecords[0]; // get first record

?>





Why am I getting this error?

Re: [s2smedia] Fatal Error?

By Jason - January 31, 2011

Hi,

Are you experiencing this issue only on this page, or on all your CMS Builder pages?

One thing I noticed is that this code:

// load viewer library
$libraryPath = '/login/lib/viewer_functions.php';
$dirsToCheck = array('/home/apexsocc/club_ambassador/pages/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }


is repeated 6 times throughout the code. It is only required once at the top of the page. Start by taking out the extra code blocks so we can start to narrow down this issue.

If you're still experiencing an issue, please fill out a [url http://www.interactivetools.com/support/]2nd Level Support Request[/url] and we can take a closer look into this for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/