Entry
Warning: Failed opening '../Globals.php4' for inclusion wht shall i do?
May 16th, 2001 08:05
Philip Olson, rt pt,
Make sure your include_path settings are correct, odds are they are
not. Have a look at the following manual entry :
Chapter 3. Configuration
http://www.php.net/manual/configuration.php#ini.include-path
Note the . in the example settings, this is important. Examples read
as such :
Example 3-1. UNIX include_path
include_path=.:/home/httpd/phplib
Example 3-2. Windows include_path
include_path=".;c:\www\phplib"
The . essentially means "current directory" as without it (in the above
example) the only possible includes would come from /home/httpd/phplib
and www\phplib respectivly (of course you can add as many as you
like). Having the . means the following will look for includes in/from
the current working directory (where the include is taking place). A
few examples :
<?php
# this file /home/www/foo/bar/index.php
# from /home/www/foo/bar/globals.inc
include 'globals.inc';
# from /home/www/foo/globals.inc
include '../globals.inc';
# from /home/www/foo/bar/includes/globals.inc
include './includes/globals.inc';
?>
If your include_path is set correct then perhaps the file does not
exist or has incorrect permissions.