please add new parametr: port
check this:
$conn = array(
'driver' => 'pdo_pgsql',
'user' => 'postgres',
'password' => 'postgres',
'dbname' => 'postgres',
'port' => '9432'
);
W dniu środa, 6 stycznia 2016 13:28:29 UTC+1 użytkownik Anderson Epk
napisał:
>
> 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.