php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10142 $HTTP_USER_AGENT 'breaks' in a URL-included file
Submitted: 2001-04-03 12:30 UTC Modified: 2001-04-03 15:08 UTC
From: bobby dot jack at excite dot com Assigned:
Status: Not a bug Package: Reproducible Crash
PHP Version: 4.0.4pl1 OS: sparc-sun-solaris2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bobby dot jack at excite dot com
New email:
PHP Version: OS:

 

 [2001-04-03 12:30 UTC] bobby dot jack at excite dot com
$HTTP_USER_AGENT reports an unexpected value when inlcuded via a URL-reference:

e.g. 

test1.php
--
<?php echo $HTTP_USER_AGENT; ?>
--

test2.php
--
<?php include "http://servername.com/test1.php"; ?>
--

http://servername.com/test1.php displays (example):
  Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)

http://servername.com/test2.php displays:
  PHP/4.0.4pl1

I can understand why this happens: when including a URL-referenced file, PHP obviously acts as the HOST that makes the request. However, is there a workaround for this?

- Bobby.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-03 15:08 UTC] sniper@php.net
submitted twice

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Apr 01 09:01:22 2020 UTC