Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get fatal error #71

Closed
hamburger123456 opened this issue Jan 5, 2015 · 1 comment
Closed

get fatal error #71

hamburger123456 opened this issue Jan 5, 2015 · 1 comment

Comments

@hamburger123456
Copy link

My site will get sometimes this error:


Fatal error: Uncaught exception 'phpbrowscap\Exception' with message 'temporary file already exists' in /www/htdocs/abc/123/scripts/Browscap.php:517
Stack trace:
#0 /www/htdocs/abc/123/scripts/Browscap.php(289): phpbrowscap\Browscap->updateCache()
#1 /www/htdocs/abc/123/collect.php(112): phpbrowscap\Browscap->getBrowser(NULL, true)
#2 /www/htdocs/abc/123/collect.php(39): pageview()
#3 {main}

thrown in /www/htdocs/abc/123/scripts/Browscap.php on line 517

in my PHP-file I have the following:

lowercase = true; $current_browser = $bc->getBrowser(null,true); I think is happens when the file is called by different user in a short period. What can I do?
@mimmi20
Copy link
Member

mimmi20 commented Jan 5, 2015

You could run this in a separate process. You may have to remove the cache.lock file in your cache directory.

$browscap = new phpbrowscap\Browscap($cacheDir);
$browscap->updateCache();

After this you should add the line

$bc->doAutoUpdate = false;

to your script.

Please look at #20 for additional information.

@asgrim asgrim closed this as completed Jan 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants