umpirsky / currency-list

:moneybag: List of all currencies with names and ISO 4217 codes in all languages and all data formats.
MIT License
309 stars 111 forks source link

Error: No such host is known #9

Open blacksmoke26 opened 6 years ago

blacksmoke26 commented 6 years ago
In AbstractMySQLDriver.php line 113:

  [Doctrine\DBAL\Exception\ConnectionException]
  An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known.

Exception trace:
 Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:184
 Doctrine\DBAL\DBALException::wrapException() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:169
 Doctrine\DBAL\DBALException::driverException() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOMySql\Driver.php:47
 Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:389
 Doctrine\DBAL\Connection->connect() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:453
 Doctrine\DBAL\Connection->getDatabasePlatformVersion() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:413
 Doctrine\DBAL\Connection->detectDatabasePlatform() at T:\repo\currency-list\vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:357
 Doctrine\DBAL\Connection->getDatabasePlatform() at T:\repo\currency-list\vendor\umpirsky\list-generator\src\Umpirsky\ListGenerator\Exporter\SqlExporter.php:85
 Umpirsky\ListGenerator\Exporter\SqlExporter->exportCreateTable() at T:\repo\currency-list\vendor\umpirsky\list-generator\src\Umpirsky\ListGenerator\Exporter\SqlExporter.php:23
 Umpirsky\ListGenerator\Exporter\SqlExporter->export() at T:\repo\currency-list\vendor\umpirsky\list-generator\src\Umpirsky\ListGenerator\Builder\Build.php:81
 Umpirsky\ListGenerator\Builder\Build->execute() at T:\repo\currency-list\vendor\symfony\console\Command\Command.php:251
 Symfony\Component\Console\Command\Command->run() at T:\repo\currency-list\vendor\symfony\console\Application.php:946
 Symfony\Component\Console\Application->doRunCommand() at T:\repo\currency-list\vendor\symfony\console\Application.php:248
 Symfony\Component\Console\Application->doRun() at T:\repo\currency-list\vendor\symfony\console\Application.php:148
 Symfony\Component\Console\Application->run() at T:\repo\currency-list\bin\build:3
umpirsky commented 6 years ago

We need to add docker support.

blacksmoke26 commented 6 years ago

@umpirsky Sorry to say that I am not using docker. Just php 7.1 or 7.2. Well I appreciate your hard work.

P.S. Repo size is huge, better add small files, once downloaded. Run to build create files. image

umpirsky commented 6 years ago

Well, we provide lots of data. :)

umpirsky commented 6 years ago

If you want to dynamically generate data, you can use https://symfony.com/doc/current/components/intl.html#currencies

blacksmoke26 commented 6 years ago

@umpirsky Thank You!

blacksmoke26 commented 6 years ago

Looks like, The Intl Component won't work for me. The replacement layer is limited to the locale "en". If you want to use other locales, you should install the intl extension instead.

I am using your solution in my project.

LocaleHelper.php.zip

umpirsky commented 6 years ago

Why don't you install intl extension?

blacksmoke26 commented 6 years ago

@umpirsky Intl extension doesn't provide countries list at all. So that's the reason I am using it.

image