GaretJax / phpbrowscap

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

Execution size & time exhausted. #63

Open DaAwesomeP opened 10 years ago

DaAwesomeP commented 10 years ago

I'm not sure if there is already an issue for this, but I am getting this every time browscap downloads an ini.

PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\\path\\to\\website\\vendor\\garetjax\\phpbrowscap\\src\\phpbrowscap\\Browscap.php on line 961
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 165 bytes) in C:\\path\\to\\website\\vendor\\vendor\\garetjax\\phpbrowscap\\src\\phpbrowscap\\Browscap.php on line 677

I've tried updating with Composer a few times, but it hasn't fixed it.

Invis1ble commented 10 years ago

+1 ini file is a huge. I had to disable auto updating in one of my projects due to lack of memory :(

DaAwesomeP commented 10 years ago

Maybe some sort of segmented downloading or saving a file to the disk every 4 mb and then combine them at the end.

Another solution which I strongly prefer would be to have a separate cron job. This way a user trying to access the website can procede as normal if there is an error.

DaAwesomeP commented 10 years ago

There is a similar issue at the other browscap repo: issue 20.