php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15667 problems with include()
Submitted: 2002-02-22 00:58 UTC Modified: 2002-03-21 16:52 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: davey at its-explosive dot net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.1.1 OS: FreeBSD 4.4-RELEASE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: davey at its-explosive dot net
New email:
PHP Version: OS:

 

 [2002-02-22 00:58 UTC] davey at its-explosive dot net
Whenever I include (or require) a page, using an http url as the file value (i.e. include("http://www.its-explosive.net/~davey/info.php");) I get this header added to the top of the page I've included.

This does not happen when I use a relative path. 

http://www.its-explosive.net/~davey/header.php show what happen when I include the file info.php using a http url to it.

---
<?php include("http://www.its-explosive.net/~davey/header.php"); ?>
---
 
The contents of info.php are "<?php phpinfo(); ?>". 
http://www.its-explosive.net/~davey/noheader.php shows what happens when I include it using the relative path:

---
<?php include("info.php"); ?>
---

The only difference (in case you didn't go, or you missed it) is the text:

---
X-Powered-By: PHP/4.1.1 Connection: close Content-Type: text/html
---

is just added onto the top.

If you goto the urls you will see my phpinfo(); and can perhaps glean some othre info from there.

I do know that if someone else includes my PHP files in their website using the include("http://..."); code they also see the x-powered-by header...

I've been looking around for a solution to this for weeks, I bet it's something simple, but I just can't find it.

I hope you can help

- Davey

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-19 02:07 UTC] gottlieb at nuri dot net
It seems that this problem has something to do with the mode change of php engine when it meets include() function;
I heard that when php engine meet include(), it turns into html mode. If it's true, there seems a high probablity that php engine recognize the mode change as having begun some output to the browser with html mode - not so consistently.

Pls check this possibility.
I hope my comment could help solving the problem.
 [2002-03-21 16:52 UTC] rasmus@php.net
I figured this one out.  Turns out his Server: string was massive overflowing our HTTP_HEADER_BLOCK_SIZE giving a weird effect.  The problem seems to be gone in the 4.3 streams code.  But a fix has been committed to 4.2.
 [2002-03-21 16:53 UTC] norny at geocities dot com
We worked out a solution in #php on OPN. Had to turn off expose_php. Rasmus said the problem was completely gone in 4.3.0. *shrug*
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Sep 19 04:00:01 2025 UTC