EllisLab text mark
Advanced Search
     
Browscap Issue
Posted: 04 November 2012 10:50 PM   [ Ignore ]
Joined: 2012-11-04
3 posts

Hey,

I’ve just had a CI site fallover with the following errors:

Browser:

A PHP Error was encountered
Severity
Warning
Message
touch() [function.touch]Utime failedOperation not permitted
Filename
third_party/Browscap.php
Line Number
247 

Server Error Log:

[Sun Nov 04 21:42:06 2012] [error] [client *****] PHP Fatal error:  Uncaught exception 'Browscap_Exception' with message 'Bad datetime format from http://browsers.garykeith.com/versions/version-date.asp' in /srv/*****.com.au/www/application/third_party/Browscap.php:500\nStack trace:\n#0 /srv/*****.com.au/www/application/third_party/Browscap.php(450): Browscap->_getRemoteMTime()\n#1 /srv/*****.com.au/www/application/third_party/Browscap.php(326): Browscap->_getRemoteIniFile('http://browsers...', '/srv/*****...')\n#2 /srv/*****.com.au/www/application/third_party/Browscap.php(243): Browscap->updateCache()\n#3 /srv/*****.com.au/www/application/libraries/MY_User_agent.php(387): Browscap->getBrowser(NULL, true)\n#4 /srv/*****.com.au/www/application/libraries/MY_User_agent.php(59): MY_User_agent->getBrowser(NULL, true)\n#5 /srv/*****.com.au/www/system/core/Loader.php(1099): MY_User_agent->__construct()\n#6 /srv/*****.com.au/www/system/core/Loader.php(9 in /srv/******.com.au/www/application/third_party/Browscap.php on line 500 

At first i was like cool, it’s just a permission problem, however it doesn’t appear to be that easy. After looking around after seeing the server error log it seems to come down to the fact that Gary Keith has closed his browscap project as of a day or two ago see https://groups.google.com/forum/#!forum/browscap and so the url is therefore not returning the responses required to continue.

I never really knew what browscap was used for but after a bit of digging i see it’s used for the user agent library, and any calls to $this->agent->browser(); etc trigger the error.

Is there any solution to this? Will my other CI sites fall over soon with the same issue?

Thanks in advance!

 
Posted: 04 November 2012 11:11 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-11-04
3 posts

Ok so after a bit more research and realising a bunch of other sites were down, you can solve the problem by deleting the browsecap file in the application/cache folder… i’m not sure how much of a fix this is but it stops the error and brings the site back up in case anyone else is getting the same problem. I’d still be interested to hear anyones thoughts.

Cheers.