$doctitle = "PHP Warning Error: \"Failed opening...\""; $authname = 'Lance Leonard'; $attrinfo = ""; // 0=All, 1=New, 2=Intermediate, 3=Expert, 4=Developers Only $audience = "1"; $versions = "Applies to: PHP v4 (possibly others)"; $postdate = "23 February 2003"; $pagearea = 5; $navlinks = 'Web Stuff:'; $metakeys = "php, warning, error, failed opening, inclusion, unknown, line 0, "; $metadesc = "Explains one reason why PHP fails to open files for inclusion in line 0."; ?> include( $DOCUMENT_ROOT . "/lib/pageinit.php" ); ?>
Answer: While there are several possible causes for this error, the most common (in our experience) lies in the permissions of the document on your server.
First, see if your error looks something like this:
Warning: Failed opening '<your document's full filename>' for inclusion (include_path='...') in Unknown on line 0
If so, verify the permissions of the file you're trying to view. Odds are, you'll find the document cannot be read publically.
For more information regarding file permissions and how to set them, please see O'Reilly's two part tutorial.
include( $DOCUMENT_ROOT . "/lib/pagecomp.php" ); ?>