GaretJax / phpbrowscap

Standalone replacement for php's native get_browser() function
MIT License
429 stars 69 forks source link

crashes on Apache 2 - 2.4 PHP 5.3.x Windows #52

Open shrz opened 10 years ago

shrz commented 10 years ago

I use Browscap to prevent crashes with native get_browser https://bugs.php.net/bug.php?id=64934 , but have same errors

[notice] Parent: child process exited with status 3221225477 -- Restarting.

With 60 copies of test_get_browser.php Apache work ~30 sec and then crashes.

I don't wont to write my own User-Agent parser and status is the same, so may be someone here can fix Browscap.

Code looks like

// Loads the class include_once './phpbrowscap/Browscap.php';

// The Browscap class is in the phpbrowscap namespace, so import it use phpbrowscap\Browscap;

// Create a new Browscap object (loads or creates the cache) $bc = new Browscap('./phpbrowscap/cache');

// Get information about the current browser's user agent $browser = $bc->getBrowser();