Re: Re: Really strange / TYPO

From: Date: Thu, 05 Oct 2006 01:56:34 +0000
Subject: Re: Re: Really strange / TYPO
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-242630@lists.php.net to get a copy of this message
On 10/4/06 9:14 PM, Deckard wrote:
It's a typo. The file is really config.inc.php everywhere
Check the file permissions. Does the Webserver have permission to read from the /var/www/html (it probably does, but it wouldn't hurt to check)? Does the Web server have permission to read /var/www/html/config.inc.php? Do you happen to have PHP running in safe_mode? If so, is the owner of /var/www/html/classes/dBInsert.php the same owner of /var/www/html/config.inc.php? These are just the things I can think of off the top of my head that would block your script from being able to include a file one directory above it.
Ben Ramsey wrote:
On 10/4/06 8:32 PM, Deckard wrote:
Hi, I have this line of code: include_once('../config.inc.php'); I'm 100% sure that the file config.inc.php is a directory up. config.inc.php is in /var/www/html and the file that calls it is in /var/www/html/classes nevertheless, i'm getting the error: "Warning: main(../config.inc): failed to open stream: No such file or directory in /var/www/html/classes/dBInsert.php on line 10 Warning: main(): Failed opening '../config.inc' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/classes/dBInsert.php on line 10"
The first thing that jumps out at me is that your error says it failed to open ../config.inc, but you say the file is named config.inc.php. Check your code to ensure that you have: include_once('../config.inc.php'); and not: include_once('../config.inc'); If config.inc.php is the correct file you want to include and you're trying to include config.inc, then it obviously can't find it because it doesn't exist. :-)
-- Ben Ramsey http://benramsey.com/

« previous php.general (#242630) next »