php - Connect to a database in Silex -


i have

    $app->register(new silex\provider\doctrineserviceprovider(), array(     'db.options' => array(         'dbname' => 'dbname',         'user' => 'user',         'password' => '',         'host' => 'host',         'driver' => 'pdo_mysql'     ), )); 

which correct, can connect database within phpstorm directly same credentials inserted in register. when

echo '<pre>' . var_export($app['db'], true) . '</pre>'; 

i get:

https://gyazo.com/7b9a106c1c44e012ff20bd34b698303c

i don't understand why it's not saying isconnected = true because credentials correct.

edit: query attempt based on silex docs example enter image description here

this results in same "whoops, looks went wrong" error.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -