Вот файлы TEST Aplication:
Directori: pruebasigi.aaaaaaaaaaaa.com / config / autoload
Файл: local.php
//config/autoload/local.php
return array(
'db' => array(
'username' => '**Aaaaaaaaaaaa**',
'password' => '**Bbbbbbbbbbbbb!**',
'dbname' => '**basedatos_pruebasigi**',
),
);
Файл: global.php
return array(
"service_manager" => array(
"factories" => array(
"Zend\Db\Adapter\Adapter" => "Zend\Db\Adapter\AdapterServiceFactory"
)
),
"db" => array(
"username" => "**Aaaaaaaaaaaa**",
"password" => "**Bbbbbbbbbbbbb**!",
"driver" => "Pdo",
"dsn" => "mysql:dbname=**basedatos_pruebasigi**;host:localhost",
"driver_options" => array(
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"
)
),
//-------------------------------------------------------------------------
'session' => array(
'config' => array(
'class' => 'Zend\Session\Config\SessionConfig',
'options' => array(
'use_cookies' => true,
),
),
'storage' => 'Zend\Session\Storage\SessionArrayStorage',
'validators' => array(
array(
'Zend\Session\Validator\RemoteAddr',
'Zend\Session\Validator\HttpUserAgent',
),
),
),
);
Это код ОРИГИНАЛЬНОЙ прикладной программы ...
Directori: sigi.aaaaaaaaaaaa.com / config / autoload
файл: local.php
return array(
'db' => array(
// for primary db adapter that called
// by $sm->get('Zend\Db\Adapter\Adapter')
'username' => '**Aaaaaaaaaaaa**',
'password' => '**Bbbbbbbbbbb!**',
// to allow other adapter to be called by
// $sm->get('db1') or $sm->get('db2') based on the adapters config.
'adapters' => array(
'db1' => array(
'username' => 'basedatos_foro',
'password' => 'xxxxxxx',
),
),
),
);
Файл: global.php
return array(
'db' => array(
//this is for primary adapter....
'driver' => 'Pdo',
'dsn' => 'mysql:dbname=**basedatos_sigi**;host=localhost',
'driver_options' => array( PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'' ),
//other adapter when it needed...
'adapters' => array(
'db1' => array(
'driver' => 'Pdo',
'dsn' => 'mysql:dbname=basedatos_foro;host=localhost',
'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''),
),
),
),
'service_manager' => array(
'factories' => array('Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',),
'abstract_factories' => array('Zend\Db\Adapter\AdapterAbstractServiceFactory',),
),
//-------------------------------------------------------------------------
'session' => array(
'config' => array(
'class' => 'Zend\Session\Config\SessionConfig',
'options' => array(
'use_cookies' => true,
),
),
'storage' => 'Zend\Session\Storage\SessionArrayStorage',
'validators' => array(
array(
'Zend\Session\Validator\RemoteAddr',
'Zend\Session\Validator\HttpUserAgent',
),
),
),
);