Ninjakreborn Posted October 29, 2006 Share Posted October 29, 2006 I never had this problem before, until now I start using this framework[code]<?php// Master Variables$docroot = $_SERVER['DOCUMENT_ROOT'];$contactemail = "[email protected]";$elevel = 1; // level of error function (either 0 for off, 1 for on)$dbactive = "yes"; // either yes or no$dbhost = "localhost"; // Normally local host$dbusername = "#####";$dbpassword = "####";$db = "#####";// connection informationif ($dbactive = "yes") { // if yes perform db workmysql_connect($dbhost, $dbusername, $dbpassword);mysql_select_db($db);}// Handling php security issuesrequire_once($docroot . '/master/config/functions/security.inc.php'); // security includeerror($elevel); // function to set error level, defaulted to all and strict.?>[/code]Ok for the security include, it's not including.It's returning[quote]Fatal error: main() [function.require]: Failed opening required '/homepages/30/d162063315/htdocs/master/config/functions/security.inc.php' (include_path='.:/usr/local/lib/php') in /homepages/30/d162063315/htdocs/oakley/master/config/config.php on line 29[/quote]The thing I don't get, is I have alway's noticed in php.ini something called include path.Normally it requires a ./ before each include. this one say's something like .: but that doesn't work either.Is there a way to override that setting manually, all the time, it ALWAY"S causes problem's or atleast it's going to. I have to already manually include the config file into every page on the server. Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/ Share on other sites More sharing options...
Barand Posted October 29, 2006 Share Posted October 29, 2006 Top 'n' tail the include file code with php tags<?php // your include code here?> Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/#findComment-116367 Share on other sites More sharing options...
Ninjakreborn Posted October 29, 2006 Author Share Posted October 29, 2006 It is, there are php tag's wrapped around the whole thing.The config.php in itself is a whole php page, I have the tag's spanning the whole page.edit- oh you mean on phpfreaks.com yes I had forgotten to do that this time, I just did it. Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/#findComment-116369 Share on other sites More sharing options...
wildteen88 Posted October 29, 2006 Share Posted October 29, 2006 The include_path directive has nothing to do with it. The [b].:[/b] tells PHP to use a the current directory. However the colon is a separator. I suggest you read up on what's the include_path is forPHP is finding the file security.inc.php however from the error it is having trouble opening this file, most probably due to the permissions are set too low so PHP is not being allowed access to this file from the OS. Make sure security.inc.php CHMOD permissions is set to 644 Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/#findComment-116370 Share on other sites More sharing options...
Ninjakreborn Posted October 29, 2006 Author Share Posted October 29, 2006 Yes, all the permission's on it, seem to be set. I checked the permission's on functions and hte permissions on the specific file security.inc.phpand it's still returning the same error. Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/#findComment-116373 Share on other sites More sharing options...
ponsho Posted October 29, 2006 Share Posted October 29, 2006 Maybe the problem is when you use the $docroot cause your output string get like this '//master/config/functions/security.inc.php'. Im not sure just a suggestion Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/#findComment-116379 Share on other sites More sharing options...
Ninjakreborn Posted October 29, 2006 Author Share Posted October 29, 2006 That still didn't fix it, I am very confused in this situation, anyone else? Quote Link to comment https://forums.phpfreaks.com/topic/25506-various-problems-with-includes/#findComment-116388 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.