Could you clarify on what doesn't work? Do you get an error message?

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On 6 January 2016 at 13:28, Anderson Garcia <[email protected]> wrote:

> 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.
>

-- 
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.

Reply via email to