currency-list icon indicating copy to clipboard operation
currency-list copied to clipboard

Error: No such host is known

Open blacksmoke26 opened this issue 5 years ago • 8 comments

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

blacksmoke26 avatar Aug 07 '18 23:08 blacksmoke26

We need to add docker support.

umpirsky avatar Aug 08 '18 06:08 umpirsky

@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

blacksmoke26 avatar Aug 09 '18 07:08 blacksmoke26

Well, we provide lots of data. :)

umpirsky avatar Aug 09 '18 10:08 umpirsky

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

umpirsky avatar Aug 09 '18 10:08 umpirsky

@umpirsky Thank You!

blacksmoke26 avatar Aug 09 '18 19:08 blacksmoke26

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

blacksmoke26 avatar Aug 09 '18 19:08 blacksmoke26

Why don't you install intl extension?

umpirsky avatar Aug 10 '18 08:08 umpirsky

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

image

blacksmoke26 avatar Aug 10 '18 22:08 blacksmoke26