Is this a bug? I am running PHP 4.1.2 with Apache/1.3.22. About 1-5 percent of the time I have missing $HTTP_SERVER_VARS. This means that when I try to access the user_agent or php_self and other related variables I get blank strings. This causes server cannot be found strings and other errors.
Anybody ever see this? I did not realize this until I wrote some code to log which user_agents visited my site and saw some blank entries.
My understanding on this is that not all servers are set up the same. Therefore, some of these vars can be missing, depending upon the server config.
Check the help files in the PHP manual for more details, as I am sure they address this issue.
No, this is on only one server and the variables are available most of the time. In my log after I browse my site for a while I will have two entries for myself. One has all the server variables that I collect and a count of how many times I have accessed with those exact vars. The second entry is all blank except for some user id vars that my site uses. So this shows that sometimes I get the vars (about 90%) abd 10% of the time I have missing vars. Looking at my Apache logs show this also since my site relies on the HTTP_ACCEPT_ENCODING variable to determine if compression is allowed and sometimes the pages are not compressed even though my browser supports compression and gets compressed pages whenever the server vars are available. I know they should be available because they always show up in the apache logs, but for some reason PHP does not get them sometimes.