php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9967 Some .php filenames generate 'Failed opening ... for inclusion...' warning.
Submitted: 2001-03-24 05:12 UTC Modified: 2001-06-10 03:16 UTC
From: cd at main dot nc dot us Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (24/03/2001) OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cd at main dot nc dot us
New email:
PHP Version: OS:

 

 [2001-03-24 05:12 UTC] cd at main dot nc dot us
The full warning is:
Warning: Failed opening '/home/cd/public_html/template.php'
for inclusion (include_path='.') in Unknown on line 0

I got this error with PHP 4.0.4pl1 and PHP 4.0.5-dev.  The
file above, template.php, works fine if I name it 'asdf.php'
or 'index.php', but every other name I've tried generates
the warning.  The content of the file doesn't matter.  It
could be empty, HTML, PHP, or HTML/PHP.

The following is from phpinfo():
System
Linux phoboslab 2.4.2 #3 Thu Feb 22 06:37:04 EST 2001 i686
unknown 

Build Date
Mar 24 2001 

Configure Command 
'./configure' '--with-mysql=/usr/local/mysql'
'--with-apxs=/usr/local/apache/bin/apxs' 

Server API
Apache 

Virtual Directory Support
disabled 

Configuration File (php.ini) Path
/usr/local/lib/php.ini 

ZEND_DEBUG
disabled 

Thread Safety
disabled

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-26 06:28 UTC] zeev@php.net
Does this problem happen consistently?  I.e., will an include() that fails, always fail, or does it fail randomly?

If it happens consistently, any chance you could give us temporary access to your machine so that we can debug it?
 [2001-06-07 15:45 UTC] sniper@php.net
I can't reproduce this. Is this reproduceable on your system
or not?

 [2001-06-08 05:13 UTC] cd at main dot nc dot us
Yes, I still get the error, even after installing 4.0.5.  I'm not using that computer right now, but it's an IBM ThinkPad A20m running Debian testing/unstable, Linux 2.4.5.  I connect with a 56k modem when I do use it.  I do keep it reasonably up to date with apt-get.  Apache, PHP, MySQL, and modperl are all compiled from source.

I'm willing to give you temporary access, if you still want to.
 [2001-06-08 05:23 UTC] cd at main dot nc dot us
To answer your first question:
It's consistent, not random.  And I don't know at what point it broke.  I did a lot of PHP development on it last year without problems, then after a few months of not developing on it, I resumed and discovered this bug.

Also, I use require(), not include().  I'm not sure if I tested it with include().
 [2001-06-10 03:16 UTC] cd at main dot nc dot us
Turned out to be a permissions problem.  <sigh>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 19:01:32 2025 UTC