It is harder to configure Postgres than mysql. Can you log in to your database with such params with psql? I mean from command line like this: psql -U postgres -W doctrine
среда, 6 января 2016 г., 18:28:29 UTC+6 пользователь Anderson Epk написал: > > hello, i m new and i trying to learn a little doing the getting start > tutorial. > > all work fine with mysql but with postgres just don't work. > i think is driver error. > > > <?php > // bootstrap.php > use Doctrine\ORM\Tools\Setup; > use Doctrine\ORM\EntityManager; > > require_once "vendor/autoload.php"; > > // Create a simple "default" Doctrine ORM configuration for Annotations > $isDevMode = true; > $config = > Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), > $isDevMode); > // or if you prefer yaml or XML > //$config = > Setup::createXMLMetadataConfiguration(array(__DIR__."/config/xml"), > $isDevMode); > //$config = > Setup::createYAMLMetadataConfiguration(array(__DIR__."/config/yaml"), > $isDevMode); > > // database configuration parameters > > WORKING FINE > $conn = array( > 'driver' => 'pdo_mysql', > 'user' => 'root', > 'password' => '', > 'dbname' => 'doctrine', > ); > > > /* NOT WORKING??? WHY?? > $conn = array( > 'driver' => 'pdo_pgsql', > 'user' => 'postgres', > 'password' => 'mypass', > 'dbname' => 'doctrine', > ); > */ > > // obtaining the entity manager > $entityManager = EntityManager::create($conn, $config); > > > > can someone help me? > thx > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
