local path config for developing
Posted: Sat May 31, 2003 4:50 am
I have this error
which is realted to the second bit of code below:
I know that it is the path and I am sure it it the method of path I am using but not sure how to proceed
This is one that works:
and this is the one that doesn't work:
I am trying to understadn why the second one does not work and the first one does.
Some help would really be appreciated please
Andrew
Code: Select all
Fatal error: Failed opening required '/apache group/apache/htdocs/icanwork/classified/stdclassifieds/lib/func_common.php' (include_path='.;c:\php4\pear') in c:\program files\apache group\apache\htdocs\icanwork\classified\stdclassifieds\index.php on line 17I know that it is the path and I am sure it it the method of path I am using but not sure how to proceed
This is one that works:
Code: Select all
if ($_SERVERї'SERVER_ADDR'] == "10.1.1.0") {
// Development Server
define ("DOCUMENT_ROOT", $_SERVERї'DOCUMENT_ROOT']);
define ("SHOP_ROOT_PATH", DOCUMENT_ROOT . "/test/ukshopLIVE/shop");
define ("SHOP_ROOT_URL", "/test/ukshopLIVE/shop");
} elseif (substr($_SERVERї'DOCUMENT_ROOT'],1,2) == ":/") {
//localhost
define ("DOCUMENT_ROOT", $_SERVERї'DOCUMENT_ROOT']);
define ("SHOP_ROOT_PATH", DOCUMENT_ROOT . "/GO_LIVE/finished");
define ("SHOP_ROOT_URL", "/GO_LIVE/finished");
} else {
//greenwichorganicS Live Site
define ("DOCUMENT_ROOT", "/home/g/o/go/public_html"); // Live Server
define ("SHOP_ROOT_PATH", DOCUMENT_ROOT . "/shop");
define ("SHOP_ROOT_URL", "/shop");
require_once(DOCUMENT_ROOT . "/shared/html_helper.php");
require_once(DOCUMENT_ROOT . "/shared/rprint.php");
}; // end ifCode: Select all
// ************* START FUNCTION path_cnfg *************
function path_cnfg($the_key){
$path_cnfg = array();
/*****************************************
*
* DO NOT CHANGE ANYTHING
* ABOVE THIS POINT,
* UNLESS YOU KNOW WHAT YOU'RE
* DOING.
*
*****************************************
* Values *SHOULD* have a trailing slash.
* The paths should be absolute, not relative.
* Windows users should be able to use
* forward slashes(/) also, since php should
* take care of the difference.
*
*/
/* Path to directory named "lib".
* You can put this directory above your
* web root if you wish.
*/
$path_cnfgї'pathToLibDir'] = '/home/w/o/working/public_html/db/lib/';
/* You probably either want to make
* the cnfg directory password protected
* or put it above your web root.
* This directory holds the file "cnfg_vars.php"
* which holds information like your db password, etc..
*/
$path_cnfgї'pathToCnfgDir'] = '/home/w/o/working/public_html/db/cnfg/';
/* This is not the path to the "admin"
* directory.
* The directory named "admin" should stay
* where it is, and the file named "index.php"
* that is in the "admin" directory should stay there.
* This is the path to the directory
* named "admin_scripts".
* You can move this above your web root or
* just leave it where it is and password protect it.
* The directory named "admin" that contains the "index.php"
* file should also be password protected.
*/
$path_cnfgї'pathToAdminScriptsDir'] = '/home/w/o/working/public_html/db/admin/admin_scripts/';
/* Path to directory named "templates".
* You can put this directory above your
* web root if you wish.
*/
$path_cnfgї'pathToTemplatesDir'] = '/home/w/o/working/public_html/db/templates/';
/* DO NOT CHANGE ANYTHING
* BELOW THIS POINT,
* UNLESS YOU KNOW WHAT YOU'RE
* DOING.
*
******************************************/
return $path_cnfgї$the_key] ;
} // end function path_cnfg
// ************* END FUNCTION path_cnfg *************
?>Some help would really be appreciated please
Andrew