supergrame Posted December 12, 2008 Share Posted December 12, 2008 Here is the code: $CONFIG->wwwroot = "localhost/project"; $CONFIG->libdir = "$CONFIG->wwwroot/lib"; require("$CONFIG->libdir/dblib.php"); And this is the error: Warning: require(localhost/project/lib/stdlib.php) [function.require]: failed to open stream: No such file or directory in C:\Xampp\htdocs\project\config.php on line 89 Fatal error: require() [function.require]: Failed opening required 'localhost/project/lib/stdlib.php' (include_path='.;C:\Xampp\php\pear\') in C:\Xampp\htdocs\project\config.php on line 89 ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/ Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 try $CONFIG->wwwroot = "localhost/project"; $CONFIG->libdir = "{$CONFIG->wwwroot}/lib"; require("{$CONFIG->libdir}/dblib.php"); Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713626 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 $CONFIG->wwwroot = "localhost/project"; $CONFIG->libdir = "{$CONFIG->wwwroot}/lib"; require("{$CONFIG->libdir}/dblib.php"); Has the same error thank any way.. what is there should work tho right? I Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713628 Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 can you post the code for the whole thing. i don't see how the code you posted could produce "localhost/project/lib/stdlib.php" Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713631 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 ? class object {}; $CONFIG = new object; /* Edit the database connection parameters below */ $CONFIG->dbhost = "localhost"; $CONFIG->dbname = "test"; $CONFIG->dbuser = "root"; $CONFIG->dbpass = ""; /*Edit the path to the scripts below*/ $CONFIG->wwwroot = "localhost/project"; //Site URL -please use the "http://www.mysite.com" format. $CONFIG->siteurl = "http://www.your-domain-name.com"; // the support email address-all the mails from the contact form will go there $CONFIG->support = ""; //Site name-this will be shown on the header,and footer,and also on every email sent $CONFIG->sitename = ""; $CONFIG->randomfee="5.00"; //Site colors $CONFIG->bgcolor = "#ffffff";//Background color $CONFIG->darkercolor="#ADAEAE";//headings color- $CONFIG->lightcolor="#ffffff";//content color,table borders $CONFIG->showstats=true;//show the site stats on the left side /* READY !!! * Do NOT EDIT BELOW!!! * OPEN THE INSTALL.PHP FILE IN YOUR BROWSER NOW */ //Site header:you can choose one of ours or you can place your own. //Just see the header.gif files from the images folder.For custom headers, $CONFIG->headerfile = "$CONFIG->siteurl/images/header_1.jpg"; //Edit below ONLY if you changed the current site structure $CONFIG->templatedir = "$CONFIG->wwwroot/templates"; $CONFIG->libdir = "$CONFIG->wwwroot/lib"; $CONFIG->imagedir = "$CONFIG->wwwroot/images"; $CONFIG->primu=$CONFIG->siteurl."/join.php?stage=primu"; $CONFIG->adminul=$CONFIG->siteurl."/join.php?stage=adminul
"; $CONFIG->hidden="hidden"; $CONFIG->complete=$CONFIG->siteurl."/users/complete.php"; /* load up standard libraries */ require("$CONFIG->libdir/stdlib.php"); require("{$CONFIG->libdir}/dblib.php"); require("$CONFIG->libdir/genlib.php"); session_start(); session_register("SESSION"); /* connect to the database */ db_connect($CONFIG->dbhost, $CONFIG->dbname, $CONFIG->dbuser, $CONFIG->dbpass); require_once("$CONFIG->libdir/general.php"); ?> Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713635 Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 ok...so here is what you should have to fix: $CONFIG->wwwroot = "localhost/project"; that needs to be set to the FILESYSTEM path. What is the FILESYSTEM path to stdlib.php? Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713640 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 xampp/htdocs/project/lib/stdlib.php I really don't understand why this ant working, i mean it is logicly correct. ?@?@?@ Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713641 Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 so, $CONFIG->wwwroot = "/xampp/htdocs/project"; Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713646 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 im running this on my machine and the localhost folder is httd. so that would be the start folder Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713649 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 sorry i mean htdocs is the local host DIR Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713651 Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 in your config.php file, put the following at the top and post the output: print __FILE__; exit; Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713652 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 C:\Xampp\htdocs\project\config.php Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713657 Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 $CONFIG->wwwroot = "/Xampp/htdocs/project"; does that still produce the error? Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713661 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 yes. and I dont have this problem with any other scripts is there something else that could effect this? Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713667 Share on other sites More sharing options...
rhodesa Posted December 12, 2008 Share Posted December 12, 2008 try this and see where it is failing: <? class object {}; $CONFIG = new object; /* Edit the database connection parameters below */ $CONFIG->dbhost = "localhost"; $CONFIG->dbname = "test"; $CONFIG->dbuser = "root"; $CONFIG->dbpass = ""; /*Edit the path to the scripts below*/ $CONFIG->wwwroot = "/Xampp/htdocs/project"; if(!realpath($CONFIG->wwwroot)) die('wwwroot is not correct'); //Site URL -please use the "http://www.mysite.com" format. $CONFIG->siteurl = "http://www.your-domain-name.com"; // the support email address-all the mails from the contact form will go there $CONFIG->support = ""; //Site name-this will be shown on the header,and footer,and also on every email sent $CONFIG->sitename = ""; $CONFIG->randomfee="5.00"; //Site colors $CONFIG->bgcolor = "#ffffff";//Background color $CONFIG->darkercolor="#ADAEAE";//headings color- $CONFIG->lightcolor="#ffffff";//content color,table borders $CONFIG->showstats=true;//show the site stats on the left side /* READY !!! * Do NOT EDIT BELOW!!! * OPEN THE INSTALL.PHP FILE IN YOUR BROWSER NOW */ //Site header:you can choose one of ours or you can place your own. //Just see the header.gif files from the images folder.For custom headers, $CONFIG->headerfile = "$CONFIG->siteurl/images/header_1.jpg"; //Edit below ONLY if you changed the current site structure $CONFIG->templatedir = "$CONFIG->wwwroot/templates"; if(!realpath($CONFIG->templatedir)) die('templatedir is not correct'); $CONFIG->libdir = "$CONFIG->wwwroot/lib"; if(!realpath($CONFIG->libdir)) die('libdir is not correct'); $CONFIG->imagedir = "$CONFIG->wwwroot/images"; if(!realpath($CONFIG->imagedir)) die('imagedir is not correct'); $CONFIG->primu=$CONFIG->siteurl."/join.php?stage=primu"; $CONFIG->adminul=$CONFIG->siteurl."/join.php?stage=adminul
"; $CONFIG->hidden="hidden"; $CONFIG->complete=$CONFIG->siteurl."/users/complete.php"; /* load up standard libraries */ require("$CONFIG->libdir/stdlib.php"); require("{$CONFIG->libdir}/dblib.php"); require("$CONFIG->libdir/genlib.php"); session_start(); session_register("SESSION"); /* connect to the database */ db_connect($CONFIG->dbhost, $CONFIG->dbname, $CONFIG->dbuser, $CONFIG->dbpass); require_once("$CONFIG->libdir/general.php"); ?> Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713674 Share on other sites More sharing options...
supergrame Posted December 12, 2008 Author Share Posted December 12, 2008 oh you are the man no errors Thanx heeps Link to comment https://forums.phpfreaks.com/topic/136673-directory-error-but-i-cant-see-anything-wrong-with-it/#findComment-713678 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.