homepage Welcome to WebmasterWorld Guest from 54.161.236.92
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Warning: include once(ERROR PAGE)
Warning: include_once(ERROR_PAGE)
elgaxton




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

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

 

Anyango




msg:4189691
 10:28 am on Aug 20, 2010 (gmt 0)

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

elgaxton




msg:4189696
 10:38 am on Aug 20, 2010 (gmt 0)

Aight! Thanks let me check

elgaxton




msg:4189780
 1:59 pm on Aug 20, 2010 (gmt 0)

It had to do with the config file
Thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved