Welcome to WebmasterWorld Guest from 54.198.93.179

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Warning: include once(ERROR PAGE)

Warning: include_once(ERROR_PAGE)

     
10:16 am on Aug 20, 2010 (gmt 0)

5+ Year Member



Hi guys,
I just got this software and about to install it.

it keeps saying: Warning: include_once(ERROR_PAGE) [function.include-once]: failed to open stream: No such file or directory in D:\wamp\www\openskool1\includes\modules.php on line 87

Here's the modues.php file:
<?php
/**
* @file includes/modules.php
* @descriptionModule model for checking, deleting, installing modules.
* @packageOpen-School v1.0
* @copyrightCopyright (C) 2005 - 2008 Open-School. All rights reserved.
* @licenseGNU/GPL, see LICENSE.php
* Open-School is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
//Shows a Module
function show_module($params)
{
if(is_module($params['module']))
{
$view = $params['view'];
$action = $params['action'];
$id = $params['id'];
include(MODULES_PATH.$params['module'].'/controller.php');
}else{
return false;
}
}
//Check Module.
function is_module($module_name)
{
$connection = db_connect();
$query = sprintf("SELECT * FROM modules WHERE name = '%s'",
mysql_real_escape_string($module_name));
$result = mysql_query($query);
//Checking Whether the Result is Empty.
$number_of_news = mysql_num_rows($result);
if ($number_of_news == 0)
{
return false;
}
return true;
}
//Returns the array of modules.
function list_modules()
{
$connection = db_connect();
$query = 'SELECT * FROM modules WHERE system = 0';
$result = mysql_query($query);
//Checking Whether the Result is Empty.
$number_of_news = mysql_num_rows($result);
if ($number_of_news == 0)
{
return false;
}
$result = result_to_array($result);
return $result;
}
function list_modules_menu()
{
$connection = db_connect();
$query = 'SELECT * FROM modules WHERE show_menu = 1';
$result = mysql_query($query);
//Checking Whether the Result is Empty.
$number_of_news = mysql_num_rows($result);
if ($number_of_news == 0)
{
return false;
}
$result = result_to_array($result);
return $result;
}
//Load template.
function load_template($module,$view)
{
if (file_exists(TEMPLATE_PATH.'modules/'.$module.'/'.$view.'.php'))
{ include_once(TEMPLATE_PATH.'modules/'.$module.'/'.$view.'.php');}
elseif (file_exists(TEMPLATE_PATH.'modules/'.$module.'/index.php'))
{ include_once(TEMPLATE_PATH.'modules/'.$module.'/index.php');}
elseif (file_exists(TEMPLATE_PATH.'index.php'))
{ include_once(TEMPLATE_PATH.'index.php');}
elseif (file_exists(SERVER_ROOT.APP_ROOT.'/templates/oslite/modules/'.$module.'/'.$view.'.php'))
{ include_once(SERVER_ROOT.APP_ROOT.'/templates/oslite/modules/'.$module.'/'.$view.'.php');}
elseif (file_exists(SERVER_ROOT.APP_ROOT.'/templates/oslite/modules/'.$module.'/'.'index.php'))
{ include_once(SERVER_ROOT.APP_ROOT.'/templates/oslite/modules/'.$module.'/'.'index.php');}
elseif (file_exists(SERVER_ROOT.APP_ROOT.'/templates/oslite/index.php'))
{ include_once(SERVER_ROOT.APP_ROOT.'/templates/oslite/index.php');}
else
{ include_once(ERROR_PAGE);}
}
?>


Please help me out... Thanks
10:28 am on Aug 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think, in the function load_template all the if calls are failing and ELSE is being executed, which is looking for

include_once(ERROR_PAGE);

but ERROR_PAGE constant might not be defined ? check if it is, or replace that with the full file path for a test
10:38 am on Aug 20, 2010 (gmt 0)

5+ Year Member



Aight! Thanks let me check
1:59 pm on Aug 20, 2010 (gmt 0)

5+ Year Member



It had to do with the config file
Thanks
 

Featured Threads

Hot Threads This Week

Hot Threads This Month