ID:               16450
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: SunOS
 PHP Version:      4.1.2
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2002-04-05 08:00:10] [EMAIL PROTECTED]

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 07:54:25] [EMAIL PROTECTED]

Trying to access non-existent files should produce an error, and
according to you it does.

Tal

------------------------------------------------------------------------

[2002-04-05 07:35:04] [EMAIL PROTECTED]

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

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16450&edit=1

Reply via email to