From:             simon at eyeeye dot com
Operating system: Linux 2.4
PHP version:      4.3.3
PHP Bug Type:     *General Issues
Bug description:  failed include function halts execution

Description:
------------
The Documentation for include says that including a missing file will
result in a warning, wheras require will resulit in an error and halt
execution.  
I've encoutered two servers where this doesn't appear to be the case.  
On one server (where I have no access to syslog) program execution simply
fails with no output when I try to include a file that it can't find.  
On another server I have, I produced a test file which attempts to include
several files, some exist, some don't.  Again it returns no output even
though files which are included before the first erroroneous include do
generate output.  The syslog shows only one PHP Warning, even though there
should be multiple warnings.  
This may be a configuration problem, but I've tried reconfiguring
everything I can think of, still to no avail.  
FYI output_buffering is off, implicit_flush is off, display_errors is on,
error_reporting is ERR_ALL (2047)


Reproduce code:
---------------
First create file contents.html containing:
<h1>TEST</h1>

Then create test.php containing:
<?php include("contents.html");?>
<?php include("firsterror.php");?>
<?php include("seconderror.php");?>



Expected result:
----------------
I'd expect to see:
<h1>TEST</h1>
PHP Warning:  main(firsterror.php): failed to open stream: No such file or
directory in /home/testsites/test1/web/test.php on line 2
PHP Warning:  main(seconderror.php): failed to open stream: No such file
or directory in /home/testsites/test1/web/test.php on line 3

and in syslog:
Sep 25 14:52:26 sibaz httpd: PHP Warning:  main(firsterror.php): failed to
open stream: No such file or directory in
/home/testsites/test1/web/test.php on line 2
Sep 25 14:52:26 sibaz httpd: PHP Warning:  main(seconderror.php): failed
to open stream: No such file or directory in
/home/testsites/test1/web/test.php on line 3

Actual result:
--------------
Nothing is output, syslog contains one line of relevence:
Sep 25 14:52:26 sibaz httpd: PHP Warning:  main(firsterror.php): failed to
open stream: No such file or directory in
/home/testsites/test1/web/test.php on line 2

-- 
Edit bug report at http://bugs.php.net/?id=25655&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25655&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25655&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25655&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25655&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25655&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25655&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25655&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25655&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25655&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25655&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25655&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25655&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25655&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25655&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25655&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25655&r=float

Reply via email to