Bug #3489: Fatal error: Failed opening required file in PHP script
| From: | d dot tilloy at nnx dot com | Date: | Tue, 15 Feb 2000 20:43:41 +0000 |
| Subject: | Bug #3489: Fatal error: Failed opening required file in PHP script | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15547@lists.php.net to get a copy of this message | ||
From: d.tilloy@nnx.com
Operating system: Linux/2.2.x / Apache-1.3.11
PHP version: 3.0.14
PHP Bug Type: Parser error
Bug description: Fatal error: Failed opening required file in PHP script
When using PHP-3.0.14 with Apache-1.3.11, include directive or
require directive randomly fail opening required file.
Exact error message is :
--- 8< ---
Fatal error: Failed opening required 'foo2.php' in
/path/to/bugphp/foo.phtml on line 2
--- 8< ---
Content of this file is like this :
$ cat foo.phtml
<?
require ("foo2.php");
echo "foo";
?>
$ cat foo2.php
<?
echo "<br>FROM FOO2<BR>
?>
The problem is the same with or without using
include_path (php3.ini, httpd.conf or .htaccess).
The only way to prevent this error is call include or require with the
full path of your file. Another potential way is to prefix file by ./ like :
require ("./foo2.php");
This problem seems to appear only on some virtualhosts, and
not another. Using .htaccess with php3_* directives seems to produce
this bug more without .htaccess.
Bug is a non reproductible crash, because this error appears randomly
(1 to 100 request, or more requests for another users of the internet).
Apache does not seems to be affected, because this problem appears
again with Apache_1.3.9, and seems to not appears with PHP-3.0.12.
--
David TILLOY - Chef de projets - <d.tilloy@nnx.com>
Neuronnexion (nnx) - 19/21, rue des Augustins - F-80000 Amiens