lundi 20 avril 2015

"FATAL: no pg_hba.conf entry for host" but I can connect trough pgAdmin

I'm having a little trouble with my dev environment for a CakePHP based project. The thing is, CakePHP can connect in production, but if I run trough XAMPP on my PC, then throws me a FATAL: no pg_hba.conf entry for host "myexternalip", user "dbuser", database "dbname", SSL off

but using the same parameters I can connect from my PC trough pgAdmin.

I've tried some googling tips that I've found like copy the libpq.dll from c:\xampp\php to c:\xampp\apache\bin but, no luck, had checked pnp.ini and extension=php_pdo_pgsql.dll line is uncommented, had tried reboot apache several times but nothing changes

The project is hosted under heroku platform and my /app/config/database.php looks like

public $production = array(
    'datasource' => 'Database/Postgres',
    'persistent' => false,
    'host' => 'anywhere.at.amazonaws.com',
    'login' => 'dbuser',
    'password' => 'dbpwd',
    'database' => 'dbname',
    'encoding' => 'utf8',
);

here's the Stack Trace

- CORE\Cake\Model\Datasource\DboSource.php line 260 → Postgres->connect()
- CORE\Cake\Model\ConnectionManager.php line 105 → DboSource->__construct(array)
- CORE\Cake\Model\Model.php line 3613 → ConnectionManager::getDataSource(string)
- CORE\Cake\Model\Model.php line 1155 → Model->setDataSource(string)
- CORE\Cake\Model\Model.php line 3640 → Model->setSource(string)
- CORE\Cake\Model\Model.php line 827 → Model->getDataSource()

Can anyone give me another hint that could help?

Aucun commentaire:

Enregistrer un commentaire