missing HTTP_USER_AGENT

missing HTTP_USER_AGENT

by Sean Keogh -
Number of replies: 4
Hi All,

I've been helping Drew out with his www.merapolis.com moodle site, which is hosted on easyspace (ugh!).

I did an upgrade last night from 1.1.1 to 1.3 release, and all went swimmingly (once I had sorted out a recalcitrant .htaccess file that was stomping forbidden errors all over the place).

However there is an odd problem. I can't get the HTML editor to work. It is enabled in the main configuration, and in all of the user profiles. But nothing appears, just the usual text box.

So I switched on debug, and got the following:

"Warning: Undefined index: HTTP_USER_AGENT in /www.merapolis.com/lib/moodlelib.php on line 2142"

So, something appears to be stripping it out. Hence moodle can't determine what browser I've got and so defaults to web forms.

I left debug switched on, logged out, then went to the login page and saw this:

"Warning: Undefined index: HTTP_REFERER in /www.merapolis.com/login/index.php on line 99"

Now normally if I saw this I'd think that it was a firewall getting in the way...but I'm not having any difficulty using the HTML Editor on this system, and I have secure forms running in my personal moodle and have no difficulty logging on there. I'm currently connecting from teh University network and am having no difficulty with other moodles.

So what do you think might be happening here?

I tried a clean install of Moodle 1.3 (2004052500) just in case, but it has made no difference.

I don't actually think it is a moodle problem as such, but has anyone heard of ISPs stripping out HTTP_USER_AGENT and HTTP_REFERER before?

Drew's moodle is up and running fine as far as I can see...but they simply can't use the editor until this is sorted out. I suggested that Drew have a word with easyspace, in case they have any ideas...or am I barking up the wrong tree?

Oxford Beardie
Average of ratings: -
In reply to Sean Keogh

Re: missing HTTP_USER_AGENT

by Sean Keogh -
By the way, I had the same problem with:

  • Firefox 0.8
  • IE 6
  • Konqueror (can't remember the version...the one that ships with Mandrake Linux 10)
On windows 2000 and Linux.


OxBeard
In reply to Sean Keogh

Re: missing HTTP_USER_AGENT

by Sean Keogh -
further info:

Upon looking at PHPINFO from the admin menu, I see:

HTTP_REFERER

http://www.merapolis.com/admin/phpinfo.php?

HTTP_USER_AGENT

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8


So, PHP *is* seeing these variables...so why isn't moodle?

This is very odd indeed.

I tested the above from my network at home just now, and tested it yesterday from the University network, and Drew tested it from his school network...still the same result...


OxBeard
In reply to Sean Keogh

Re: missing HTTP_USER_AGENT

by Teemu Sumi -
Please check the config.php thoroughly and make sure it doesn't have any blank lines at the end of it.

This solved the problem, when I tried 1.2-dev on Win 2000 server


Teemu
In reply to Teemu Sumi

Re: missing HTTP_USER_AGENT

by Sean Keogh -
it definitely doesn't...this was one of the first things I checked.


OxBeard