PHP 4.0 Bug #1761 Updated: require/include functions broken -- give "document contains no data error"
| From: | dmf14 at cornell dot edu | Date: | Sun, 05 Nov 2000 08:47:43 +0000 |
| Subject: | PHP 4.0 Bug #1761 Updated: require/include functions broken -- give "document contains no data error" | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37156@lists.php.net to get a copy of this message | ||
ID: 1761
User Update by: dmf14@cornell.edu
Status: Open
Bug Type: *General Issues
Description: require/include functions broken -- give "document contains no data error"
brozen@torah.org added that last comment
Previous Comments:
---------------------------------------------------------------------------
[2000-11-05 03:46:17] dmf14@cornell.edu
I have Apache 1.3.9 and include'ing doesn't work properly.
Please take a look at this:
http://zeraim.torah.org/~cblack/testdir/index.php3
http://zeraim.torah.org/~cblack/testdir/index.php3?sid=3
Now, try these:
http://terumah.teamgenesis.com/~cblack/index.php3
http://terumah.teamgenesis.com/~cblack/index.php3?sid=2
Precisely the same code. PHP on zeraim incorporates the header & footer and
then parses all as one, while on terumah it is attempting to parse the
header & footer as if they were independent of the file into which they are
included.
Or in other words, PHP used to incorporate a 'require()ed' file without
doing any work on it, and then parsed the whole thing together. So you
could have an IF statement in the header [ if (...) { ] that ended in the
footer [ } ].
No longer! That's why the same code is generating parse errors.
---------------------------------------------------------------------------
[1999-07-31 13:20:41] zeev@cvs.php.net
This is an Apache bug - Apache doesn't always properly generate
DSO modules.
It's fixed in Apache 1.3.7/1.3.8
---------------------------------------------------------------------------
[1999-07-20 14:14:41] dmf14@cornell.edu
Using the include or require function, seemingly anywhere, in a PHP script yields a "Document
contains no data" error in Netscape or a "Unexpected network read error; connection
aborted/Unable to access document" error in lynx.
Example:
file "foo.inc" contains one line:
Hello
file "foo.php" contains six lines:
<html><head><title>Hello World!</title></head><body>
<?
require('foo.inc');
echo " world!<br>n";
?>
</body></html>
Compile Information: Have PHP4 compiled as a shared Apache module (DSO) under Apache 1.3.6.
Configure line: ./configure --with-apxs=/usr/sbin/apxs --with-mysql --enable-track-vars
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=1761