Page 1 of 1

Directory error

Posted: Tue Jun 22, 2010 11:09 am
by Aravinthan
Hi guys,

I have a problem with SiteRoot....

so I have this code here:

Code: Select all

<?php
//Main initiation file
//Whenever a page is load, the content below should be load.

//To keep track of the good file location
//The directory separator is now defined as the constant DS
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);

//Define the site root, to be change when moving the site
defined('SITE_ROOT') ? null :
	define('SITE_ROOT', DS."www".DS."uw-ligues");

//Define library path (path to the include folder)
defined('LIB_PATH') ? null :
	define('LIB_PATH', SITE_ROOT.DS.'includes');

//Loading configuration file first
require_once(LIB_PATH.DS.'config.php');

//Loading basic functions
require_once(LIB_PATH.DS.'functions.php');

//Loading core object
require_once(LIB_PATH.DS.'class_session.php');
require_once(LIB_PATH.DS.'class_database.php');
require_once(LIB_PATH.DS.'class_database_object.php');


// Loading objects
require_once(LIB_PATH.DS.'class_player.php');
require_once(LIB_PATH.DS.'class_position.php');
require_once(LIB_PATH.DS.'class_view.php');
require_once(LIB_PATH.DS.'class_pagination.php');

// On met des valeurs par dŽfaut requises par PHP5
date_default_timezone_set('America/Montreal');
setlocale(LC_MONETARY, 'en_US');


?>
And it keeps returning me:
Warning: require_once(/www/uw-ligues/includes/config.php) [function.require-once]: failed to open stream: No such file or directory in /home/uweavec1/public_html/uw-ligues/includes/initialize.php on line 18

Fatal error: require_once() [function.require]: Failed opening required '/www/uw-ligues/includes/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/uweavec1/public_html/uw-ligues/includes/initialize.php on line 18
But the file is in the correct directory...

Thanks for your help,
ara

Re: Directory error

Posted: Tue Jun 22, 2010 12:38 pm
by Jade
Do you have the correct permissions setup on the www directory? Have you tried fixing the site root instead of just trying to transform the include files? Are you on a Linux machine? I believe you can change your site root via the /etc/passwd file and your apache config file.

Re: Directory error

Posted: Tue Jun 22, 2010 12:46 pm
by Aravinthan
Yh did all that...

The thing it worked fine yesterday.... but it seems to bug today..

Re: Directory error

Posted: Tue Jun 22, 2010 2:39 pm
by Jade
Are you using a different browser today? What's changed since yesterday?