Closed (duplicate)
Project:
Browscap
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2012 at 20:07 UTC
Updated:
14 Oct 2013 at 20:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
bacchus101 commentedI'm also getting this error on Drupal 7 running PHP 5.2.17.
Comment #2
toomanypets commentedI have the same problem with PHP 5.2.17 (browscap module version 7.x-2.0).
Per http://tempdownloads.browserscap.com it seems we should be using http://tempdownloads.browserscap.com/stream.php?PHP_BrowsCapINI instead of http://tempdownloads.browserscap.com/stream.php?BrowsCapINI
I modified line 51 of import.inc to resolve the problem.
Before:
After:
Comment #3
toomanypets commentedComment #4
izmeez commented@toomanypets Thank you. Fix in #2 works like a charm.
Comment #5
devin carlson commentedMarked #1868294: can not refresh browscap data as a duplicate.
Comment #6
greggmarshall#2 also worked for me, time to mark RTBC?
Comment #7
Jenechka commented#2 Thank you! Also waiting for the patched version.
Comment #8
tedbowI have created a patch against 7.x-2.x-dev.
Here is what I added
I added the variable_get so that you could manually override the url if you wanted to.
http://tempdownloads.browserscap.com/
also lists a full and lite version that you could potentially change the URL to. The simplest way to change variable is probably through drush but this could be done via code also.
I think the main benefit of having a URL override is the potential for the browscap site changing the URL. This is probably what happened to cause this problem in the first place. So with this patch sites could immediately change the URL(without patching) while they waited for the module to be updated.
Comment #9
mondrakeYou can also see the patch in #3 of #1788720: Allow to change the URLs to use for importing useragent information.
It adds 2 variables ( one also for versn checking), plus a change to the admin form to manage them.
Comment #10
studioorange commented@toomanypets: The solution given works like a charm. Thanks.
Comment #11
Cyclodex commentedI had issue that adaptivetheme throw an error, regarding
Undefined index: ismobiledeviceThe URL change helped out and so adaptivetheme is working again fine for me.
Thanks for that!
Comment #12
2ndmile commented#2 worked for me as well.
Comment #13
kenianbei commented#2 and #8 both worked for me.
Comment #14
computerwill commentedI'm glad that this fix (#2) works. I didn't try the other fixes, but they look interesting, too. In case anyone searches for this later and is stumped as to what was going on here, I figured I would document it as best as I could figure out. It broke because http://tempdownloads.browserscap.com/ changed (added?) the URL for PHP users of their files. The old link (http://tempdownloads.browserscap.com:889/stream.php?BrowsCapINI) now has a warning on their page not to use it with PHP. The new link (http://tempdownloads.browserscap.com/stream.asp?PHP_BrowsCapINI) uses quotes around the values.
The lack of quote was causing the import to choke when it got to line 386, which had the first value with an exclamation mark in the file. It looks like the new link puts quotes around the values. Here are some snippets:
Old link:
New link:
Thanks again, community!
Comment #15
wxman commented#2 and #8 worked for me too.
Comment #16
nateman332 commentedI can confirm that the patch in #8 work for version 6.x-2.0. (manually changed)
Comment #17
lorenz commentedI too confirm that #8 worked for version 6.x-2.0. (manually changed)
Comment #18
mrtoner commentedI could not install 7.x-2.0 for the first time until I applied #2.
Comment #19
gregglesIt feels to me like this is roughly a duplicate of #1788720: Allow to change the URLs to use for importing useragent information which has the same feature and a UI to change the url in the future.