browscap / BrowscapBundle

Symfony2 Bundle to access the browscap information
13 stars 12 forks source link

browscap:update command fail #20

Open soullivaneuh opened 6 years ago

soullivaneuh commented 6 years ago

On local:

$ ./bin/console browscap:update      

  [phpbrowscap\Exception]                               
  Bad datetime format from http://browscap.org/version  

Even worse on CI:

$ ./bin/console browscap:update --env=test

  [Symfony\Component\Debug\Exception\ContextErrorException]   
  Warning: syntax error, unexpected '}' in Unknown on line 1  

I still have this env from a while:

sullivan@6674077520e8:/code$ composer show | grep browscap
browscap/browscap-bundle                 dev-master 6071708   Allows you to get browser information
browscap/browscap-php                    2.1.1                Standalone replacement for php's native get_browser() function

And didn't have this error before. It seems to be something wrong with browscap.org. Maybe CloudFlare rules?

Regards.

mimmi20 commented 6 years ago

Yes browscap.org returns a 503 error at the moment.

maxvi commented 6 years ago

@mimmi20 , browscap.org are protected by Cloudflare, that's why you get 503 (using script, just try to open via browser) @Soullivaneuh are right, rules should be configured properly

maxvi commented 6 years ago

@mimmi20, as a temporary solution you can use https://github.com/browscap/BrowscapBundle#configuration

browscap:
    update_method: 'local'
    local_file: '/path/to/php_browscap.ini'
asgrim commented 6 years ago

See browscap/browscap-php#228