0
Welcome Guest! Login
0 items Join Now

What would cause "Undefined index: HTTP_USER_AGENT" error?

    • prim's Avatar
    • prim
    • Preeminent Rocketeer
    • Posts: 17290
    • Thanks: 217

    Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 13 years 1 month ago
    • Sometimes this can happen when the browser don't send out a valid user agent string and the PHP code doesn't know how to handle it. Sometimes it's a bug by the coder.

      You can check your own UA here: whatsmyuseragent.com/

      I hope this makes sense :)
    • Please reply with a direct link to the issue & create a new thread for each new issue.

      A template is only as good as the content that goes into it ;) - DanG
  • Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 13 years 1 month ago
    • I understand your comment, Prim, but it was my client (using a PC with IE and Firefox) that first brought the error to my attention. I then saw the same thing on my Mac in FF and Safari.
      Regardless, the error has disappeared at this point.
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 13 years 1 month ago
    • Tami Whiteside wrote:
      I understand your comment, Prim, but it was my client (using a PC with IE and Firefox) that first brought the error to my attention. I then saw the same thing on my Mac in FF and Safari.
      Regardless, the error has disappeared at this point.
      On occasion I've heard this happening when the hoster has some hiccups at their end, I'll leave this post open for a couple of days before I mark it solved.
  • Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 11 years 8 months ago
    • Also this error can be produced when a SWF file is doing the request...

      To fix this replace the line 30 in \www\libraries\gantry\core\gantrybrowser.class.php and line 22 from \www\modules\mod_roknavmenu\lib\common\RokBrowserCheck.php
      $this->_ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "undefined";
      instead of
      $this->_ua =$_SERVER['HTTP_USER_AGENT']);
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 11 years 8 months ago
    • BM-Services wrote:
      Also this error can be produced when a SWF file is doing the request...

      To fix this replace the line 30 in \www\libraries\gantry\core\gantrybrowser.class.php and line 22 from \www\modules\mod_roknavmenu\lib\common\RokBrowserCheck.php
      $this->_ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "undefined";
      instead of
      $this->_ua =$_SERVER['HTTP_USER_AGENT']);
      Hi
      and welcome to the forums :)
      Thanks for the heads up, much appreciated. Just out of curiosity is or was your Joomla caching set to 'cachelite' as this also causes the error.
      Do you think the error is reproducible on your site by going back to the original RokBrowserCheck.php?
  • Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 11 years 7 months ago
    • no caching on joomla.

      The error is reproduced with the original RokBrowserCheck.php... I got this error while I was adding a custom field in the administrator area using the fancyUpload ( digitarald.de/project/fancyupload/3-0/ ) and a while ago I saw the same error when I was developing a flash application inside joomla.
  • Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 11 years 7 months ago
  • Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 9 years 9 months ago
    • A year later (gantry v4.1.24) and still those errors.

      My errors were a result of a cronjob (acymailing) trigger.

      Can gantrybrowser.class.php and RokBrowserCheck.php really not be updated with the proposed patch from BM-Services?
  • Re: What would cause "Undefined index: HTTP_USER_AGENT" error?

    Posted 9 years 9 months ago
    • We are also seeing these errors, The proposed patch should be implemented.

      I've added our errors to the secure section.
    • Last Edit: 9 years 9 months ago by jtechmedical.

Time to create page: 0.052 seconds