Bonjour, je cherche à créer une application qui se connectera à une DB Oracle.
Je crée donc un fichier de config 'global.php' dans config/ qui renvoie ceci :
Cela n'a pas l'air de fonctionner... En 1.11 tout se faisait dans un fichier de config 'ini'... Je suis un peu perdu :mouarf:Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 <?php $dbParams = array( .... ); return array( 'db' => array( 'driver' => 'Oracle', 'dbname' => 'MADB', 'username' => 'MONUSER', 'host' => 'MONHOST', 'password' => 'MONPASS', 'driver_options' => array( ), ), 'service_manager' => array( 'factories' => array( 'Zend\Db\Adapter\Adapter' => function ($sm) use ($dbParams) { $adapter = new BjyProfiler\Db\Adapter\ProfilingAdapter(array( 'driver' => 'pdo', 'dsn' => 'mysql:dbname='.$dbParams['database'].';host='.$dbParams['hostname'], 'database' => $dbParams['database'], 'username' => $dbParams['username'], 'password' => $dbParams['password'], 'hostname' => $dbParams['hostname'], )); $adapter->setProfiler(new BjyProfiler\Db\Profiler\Profiler); $adapter->injectProfilingStatementPrototype(); return $adapter; }, ), ), );