Ongoing problem with browscap not updating
mrbriano - April 25, 2007 - 18:06
| Project: | Browscap |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
Patching the URLs in the module doesn't fix the updating problem.
I'm seeing the following in the httpd error log:
PHP Notice: Trying to get property of non-object in /drupal/modules/browscap/browscap.module on line 39
PHP Notice: Undefined property: stdClass::$htmltables in /drupal/modules/browscap/browscap.module on line 40
PHP Notice: Undefined property: stdClass::$parent in /drupal/modules/browscap/browscap.module on line 241
PHP Notice: Undefined property: stdClass::$crawler in /drupal/modules/browscap/browscap.module on line 246
PHP Notice: Undefined property: stdClass::$crawler in /drupal/modules/browscap/browscap.module on line 251I'm running the entropy.ch PHP 5.2.1 package for Apache 1.3 on OS X Server 10.4.7. I have another box setup with the
same software combo for testing and it shows the same PHP notices in it's log, also.
Somebody mentioned a problem with downloading the CSV file using cron.
Using curl to fetch the CSV zip file manually shows this:
curl -v http://browsers.garykeith.com/stream.asp?CSV_BrowsCapZIP -o /temp/CSV_Browscap.zip
* About to connect() to browsers.garykeith.com port 80
* Trying 67.19.148.59... * connected
* Connected to browsers.garykeith.com (67.19.148.59) port 80
> GET /stream.asp?CSV_BrowsCapZIP HTTP/1.1
User-Agent: curl/7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7l zlib/1.2.3
Host: browsers.garykeith.com
Pragma: no-cache
Accept: */*
< HTTP/1.1 200 OK
< Date: Wed, 25 Apr 2007 17:20:16 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< Content-Disposition: attachment; filename=csv_browscap.zip
< Content-Length: 53539
< Content-Type: application/octet-stream; Charset=UTF-8
< Cache-control: private
< Transfer-Encoding: chunked
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 53539 0 53539 0 0 72537 0 --:--:-- --:--:-- --:--:-- 130k* Connection #0 to host browsers.garykeith.com left intact
* Closing connection #0I tried twiddling the URL in the module and from the cl with curl, putting in the IP number and such, but the site re-directs to the front page
if anything but http://browsers.garykeith.com/... is used. I also tried placing the downloaded zip file and the CSV file in the tmp directory to see
if it would get processed when cron.php was run, nothing.

#1
I believe that Gary Keith has changed the format of the file that the module is reading. The module is getting unexpected data and is breaking.
The 5.x version of the module fixes this problem and allows for reformatting of the data in the future. Perhaps someone could backport these changes to 4.7?
#2
I think 4.7 is just no longer supported.