Closed michael-e closed 10 years ago
On my linux box, it does show up. I think I'll check with isset
first.
I am so glad to have implemented the thing using a facade. Things are so easier to fix!
Any reasons why you don't want to use $_SERVER["HTTP_USER_AGENT"]
(which everybody uses is this case)?
To not cause a regression bug... but I'll check $_SERVER first.
@michael-e
So, as mention in https://github.com/symphonycms/symphony-2/pull/2136, maybe we should use getenv
for HTTP_USER_AGENT and REMOTE_ADDR ?
Yes, maybe we should do this, just because Symphony uses this as well. Or, even simpler: Use the Symphony constants HTTP_USER_AGENT
and REMOTE_ADDR
. So if anything doesn't work, we can blame it on Symphony.
I forgot: Please check since when these constants are available (and change the compatibility info accordingly).
I did a Git blame which tells me that these constants have been around for a very long time now. So I say: Just use them and blame it on Symphony! :-)
So if anything doesn't work, we can blame it on Symphony.
That's simply brillant.
I did a Git blame
You're awesome. Anyhow, current compatibility is at 2.4 and will stay like this!
@michael-e, can you please confirm 82f4b45 solves the issue on your box?
Yep, confirmed. (The box is Debian 7 with PHP 5.4.4, BTW.)
That's interesting... I run CentOS... because, you know, CPanel.
I really like Debian. Super-stable stuff, great package management. My "big project" machine is up for 314 days without any issues (apart from the issues I introduced in the app, of course).
But michael-e is going down for reboot now (2:40 a.m.). This will take some time… See you tomorrow!
Sleep thigh and thanks again, a thousand times.
In my environment, the user agent is always empty. I looked at the code and wondered why you use
$_ENV["HTTP_USER_AGENT"]
here. Is the user agent supposed to be in$_ENV
at all?If I change it to
$_SERVER["HTTP_USER_AGENT"]
, it works as expected.