Jump to content

various problem's with includes


Ninjakreborn

Recommended Posts

I never had this problem before, until now I start using this framework
[code]
<?php
// Master Variables
$docroot = $_SERVER['DOCUMENT_ROOT'];
$contactemail = "businessman332211@hotmail.com";
$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 information
if ($dbactive = "yes") { // if yes perform db work
mysql_connect($dbhost, $dbusername, $dbpassword);
mysql_select_db($db);
}

// Handling php security issues
require_once($docroot . '/master/config/functions/security.inc.php'); // security include
error($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.
Link to comment
Share on other sites

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 for

PHP 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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.