PHP 4.0 Bug #10142: $HTTP_USER_AGENT 'breaks' in a URL-included file
| From: | bobby dot jack at excite dot com | Date: | Tue, 03 Apr 2001 16:30:47 +0000 |
| Subject: | PHP 4.0 Bug #10142: $HTTP_USER_AGENT 'breaks' in a URL-included file | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50712@lists.php.net to get a copy of this message | ||
From: bobby.jack@excite.com
Operating system: sparc-sun-solaris2.6
PHP version: 4.0.4pl1
PHP Bug Type: Reproduceable crash
Bug description: $HTTP_USER_AGENT 'breaks' in a URL-included file
$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.
--
Edit Bug report at: http://bugs.php.net/?id=10142&edit=1