ID:               21565
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Tru64Unix 5.1A
 PHP Version:      4.3.0
 New Comment:

Well, you are right with the difference fatal error vs. warning. After
I turned the warning messages on I can see the difference. So, the
problem should be re-classified as a problem of both include and
require. 

Still, with safe_mode on, it does not work, with safe_mode off, it
works fine.


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

[2003-01-10 16:56:46] [EMAIL PROTECTED]

It is likely that your error reporting level is such that warning
messages do not get shown. Unlike require which fails with an error
include will only output a warning on failure.
Beyond that there is very little difference between the require/include
code none of which is the code reponsible for actually openning files.

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

[2003-01-10 03:35:37] [EMAIL PROTECTED]

After upgrade from PHP 4.2.2 to 4.3.0 I encountered the problem with
safe_mode in conjunction with require().

Example:

[php.ini]
safe_mode = On;
include_path = ".:./:/path/to/my/app/dir";
safe_mode_include_dir = ".:./:/path/to/my/app/dir";

[/path/to/my/app/dir/index_working.php] - works fine for me
<?php
include "header.php";
?>

[/path/to/my/app/dir/index_buggy.php] - throws error
<?php
require "header.php";
?>


The error:

[error] PHP Fatal error:  main() [<a
href='http://www.php.net/function.main'>function.main</a>]: Failed
opening required 'header.php' (include_path='.:./:/path/to/my/app/dir')
in /path/to/my/app/dir/index_buggy.php on line 2



Operating system: Tru64Unix 5.1a
Webserver: Apache 1.3.26


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


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

Reply via email to