php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16450 Failed opening . for inclusion (include_p='.:/../lib/php') in Unknown on line 0
Submitted: 2002-04-05 07:35 UTC Modified: 2002-06-11 12:38 UTC
From: info at headliner dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.1.2 OS: SunOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: info at headliner dot nl
New email:
PHP Version: OS:

 

 [2002-04-05 07:35 UTC] info at headliner dot nl
If I request any php file that does not exist in the current path I always get:

Warning: Failed opening '/path/to/file.php' for inclusion (include_path='.:/usr/local/php-4.1.2/lib/php') in Unknown on line 0

when I try for example to open "http://www.host.com/doesnt_exist.php" I get the error, though when I try "http://www.host.com/dir/doesnt_exist.php" and the directory "dir" does not exist I get a normal 404 error. But when directory "dir" DOES exist I get the Failed opening error again.

It only happens when I try to open files with the extension that is parsed by the php deamon (I included .html and .php)
so:

"http://www.host.com/doesnt_exist.php" gives failed...
"http://www.host.com/doesnt_exist.html" gives failed...
"http://www.host.com/doesnt_exist.txt" gives normal 404 error
"http://www.host.com/not_here/doesnt_exist.php" gives normal 404
"http://www.host.com/here/doesnt_exist.php" gives failed...

I use php 4.1.2 and apache 1.3.20 and happened when I upgraded to 4.1.2.

Configure Command:  './configure' '--with-mysql=/usr/local/mysql' '--with-apxs=/usr/local/apache-1.3.20/bin/apxs' '--enable-track-vars' '--with-gdbm=/usr/local/gnu' '--with-config-file-path=/usr/local/php-4.1.2/lib' '--with-mhash=/usr/local' '--with-zlib=/usr/local' '--with-gd' '--with-ttf' '--prefix=/usr/local/php-4.1.2' 

in the phpinfo() also:
include_path: .:/usr/local/php-4.1.2/lib/php

.: is correct??

Everything except accessing non existing files works perfectly

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-05 07:54 UTC] tal@php.net
Trying to access non-existent files should produce an error, and according to you it does.

Tal
 [2002-04-05 08:00 UTC] derick@php.net
Please try php 4.2.0rc2 from www.php.net/~derick and then try the following things:
- Does it still happen now?
- What happens if you remove .html from your parsed-by-php extensions?

Derick
 [2002-04-05 08:12 UTC] info at headliner dot nl
indeed, but it should produce a 404 error through the header so the browser knows it does not exist. But instead it produces a text error: 
"Warning: Failed opening '/path/to/file.php' for inclusion
(include_path='.:/usr/local/php-4.1.2/lib/php') in Unknown on line 0"

so more technically:

the url "www.host.com/doesnt_exist.php" gives:
HTTP/1.1 200 OK
Date: Fri, 05 Apr 2002 13:09:06 GMT
Server: Apache/1.3.19 (Unix) mod_gzip/1.3.19.1a PHP/4.1.2
X-Powered-By: PHP/4.1.2
Connection: close
Content-Type: text/html

<br>
<b>Warning</b>:  Failed opening '/vol/www/headliner/web-docs/blaat.php' for inclusion (include_path='.:/usr/local/php-4.1.2/lib/php') in <b>Unknown</b> on line <b>0</b><br>

and "www.host.com/nothere/doesnt_exist.php" gives:

HTTP/1.1 404 Not Found
Date: Fri, 05 Apr 2002 13:09:56 GMT
Server: Apache/1.3.19 (Unix) mod_gzip/1.3.19.1a PHP/4.1.2
Connection: close
Content-Type: text/html; charset=iso-8859-1

when I remove the .html extension I get a good error 404 error message, I didn't install 4.2.0rc2 yet since I'm not root on it personally but I'll ask my provider.
 [2002-06-11 12:38 UTC] info at headliner dot nl
finally my webhoster installed php latest version and the bug is not there anymore.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jan 13 19:00:02 2026 UTC