php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33308 HTTP_HOST with include
Submitted: 2005-06-11 08:33 UTC Modified: 2005-06-11 08:37 UTC
From: babytje_ab at hotmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.11 OS: debian
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: babytje_ab at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-06-11 08:33 UTC] babytje_ab at hotmail dot com
Description:
------------
when you include a script from
site1 to site2
then $HTTP_HOST or $_SERVER["HTTP_HOST"]
whil give me site1 instead of site2
can it be a fix around to this?

Reproduce code:
---------------
site1: www.site1.com/script.php
<?php
echo $_SERVER["HTTP_HOST"];
?>

site2: www.site2.com/somting.php
<?php
include "www.site1.com/script.php";
?>

Expected result:
----------------
www.site2.com

Actual result:
--------------
www.site1.com

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-11 08:37 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

. 
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 09 02:00:03 2025 UTC