I\'ve just been looking through a website\'s error_log and one of the error\'s that has been logged a few times is:
error_log
[21-Jun-2011 12:24:03] PHP Not
PHP docs says:
'HTTP_USER_AGENT' Contents of the User-Agent: header from the current request, if there is one.
(relevant part italicised) so it would appear it might not always be set.