Configuration parameter "adapter" missing in "db"
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Configuration parameter "adapter" missing in "db"
I got an error after executing
The error message is:
Do you know what is this error about?
I checked database connection and it seems to be ok.
php-version: 7.0.15
Aimeos version: 2017.03.1
ubuntu 16.04
Code: Select all
php artisan aimeos:setup --option=setup/default/demo:1
Code: Select all
[Aimeos\MW\Setup\Exception]
Configuration parameter "adapter" missing in "db"
I checked database connection and it seems to be ok.
php-version: 7.0.15
Aimeos version: 2017.03.1
ubuntu 16.04
Re: Configuration parameter "adapter" missing in "db"
The problem is the ".env" file. Please check if it contains the "DB_CONNECTION" variable set correctly
Sometimes, it also doesn't work as expected. Ddd your database configuration to your "./config/shop.php" file directly in this case:
https://github.com/aimeos/aimeos-larave ... op.php#L29
Sometimes, it also doesn't work as expected. Ddd your database configuration to your "./config/shop.php" file directly in this case:
https://github.com/aimeos/aimeos-larave ... op.php#L29
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 3
- Joined: 14 Mar 2017, 15:19
Re: Configuration parameter "adapter" missing in "db"
"Add your database configuration to your "./config/shop.php" file directly in this case" - nothing happens, receive the same message.
In order to make it work for me, i had to pass the array['db'] values manually into the Multiple.php file.
Before ...foreach( $dbconfig as $rname => $dbconf )... on line 56, i insert:
$dbconfig = array('db' => array('adapter' => 'mysql', 'database' => 'sdbdev'));
Why to do that? I notice that $dbconfig var didn't receive the array structure, pulling only the first nivel 'db' -> array (0);
php-version: 7.0.16
Aimeos version: 2017.03.1
CentOS 6.5
In order to make it work for me, i had to pass the array['db'] values manually into the Multiple.php file.
Before ...foreach( $dbconfig as $rname => $dbconf )... on line 56, i insert:
$dbconfig = array('db' => array('adapter' => 'mysql', 'database' => 'sdbdev'));
Why to do that? I notice that $dbconfig var didn't receive the array structure, pulling only the first nivel 'db' -> array (0);
php-version: 7.0.16
Aimeos version: 2017.03.1
CentOS 6.5
Re: Configuration parameter "adapter" missing in "db"
Did you add all necessary database configuration to your ./config/shop.php (adapter, host, port, database, username, password and stmts)? If yes, does it work if you remove the "env()" function and use only the literal strings?
Code: Select all
'resource' => array(
'db' => array(
'adapter' => 'mysql',
'host' => 'localhost',
'port' => '',
'database' => 'laravel',
'username' => 'root',
'password' => 'secret',
'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
),
),
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 3
- Joined: 14 Mar 2017, 15:19
Re: Configuration parameter "adapter" missing in "db"
Yes and No. I add all the necessary database config, but even removing the "env()" it still does not work. The only way i found was a manual insert of the code line "$dbconfig = array('db' => array('adapter' => 'mysql', 'database' => 'sdbdev'));" and running php artisan aimeos:setup. After then remove the code.aimeos wrote:Did you add all necessary database configuration to your ./config/shop.php (adapter, host, port, database, username, password and stmts)? If yes, does it work if you remove the "env()" function and use only the literal strings?Code: Select all
'resource' => array( 'db' => array( 'adapter' => 'mysql', 'host' => 'localhost', 'port' => '', 'database' => 'laravel', 'username' => 'root', 'password' => 'secret', 'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ), ), ),
Re: Configuration parameter "adapter" missing in "db"
That can't be the solution :-/
Can you post your full ./config/shop.php file and the error message thrown by the "./artisan aimeos:setup" command?
Can you post your full ./config/shop.php file and the error message thrown by the "./artisan aimeos:setup" command?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 3
- Joined: 14 Mar 2017, 15:19
Re: Configuration parameter "adapter" missing in "db"
aimeos wrote:That can't be the solution :-/
Can you post your full ./config/shop.php file and the error message thrown by the "./artisan aimeos:setup" command?
Code: Select all
<?php
return array(
'routes' => array(
// 'login' => array('middleware' => ['web']),
// 'admin' => array('middleware' => ['web', 'auth']),
// 'account' => array('middleware' => ['web', 'auth']),
// 'jsonapi' => array('middleware' => ['web']),
// 'default' => array('middleware' => ['web']),
// 'confirm' => array('middleware' => ['web']),
// 'update' => array(),
),
'page' => array(
// 'account-index' => array( 'account/profile','account/history','account/favorite','account/watch','basket/mini','catalog/session' ),
// 'basket-index' => array( 'basket/standard','basket/related' ),
// 'catalog-count' => array( 'catalog/count' ),
// 'catalog-detail' => array( 'basket/mini','catalog/stage','catalog/detail','catalog/session' ),
// 'catalog-list' => array( 'basket/mini','catalog/filter','catalog/stage','catalog/lists' ),
// 'catalog-stock' => array( 'catalog/stock' ),
// 'catalog-suggest' => array( 'catalog/suggest' ),
// 'checkout-confirm' => array( 'checkout/confirm' ),
// 'checkout-index' => array( 'checkout/standard' ),
// 'checkout-update' => array( 'checkout/update'),
),
'resource' => array(
'db' => array(
'adapter' => 'mysql',
'host' => 'localhost',
'port' => '',
'database' => 'sctdb',
'username' => 'root',
'password' => '',
'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
),
),
'admin' => array(),
'client' => array(
'html' => array(
'common' => array(
'content' => array(
// 'baseurl' => '/',
),
'template' => array(
// 'baseurl' => 'packages/aimeos/shop/themes/elegance',
),
),
),
),
'controller' => array(
),
'i18n' => array(
),
'madmin' => array(
),
'mshop' => array(
),
'command' => array(
),
'frontend' => array(
),
'backend' => array(
),
);
[Aimeos\MW\Setup\Exception]
Configuration parameter "adapter" missing in "db"
Re: Configuration parameter "adapter" missing in "db"
We get the same problem when using the default "./config/shop.php" because it contains these lines:
They cause an empty "resource/db" array in the Aimeos setup command but removing all comments works:
What works too is to comment out the whole block:
Then, the default resource configuration is used.
Code: Select all
'resource' => array(
'db' => array(
// 'adapter' => env('DB_CONNECTION', 'mysql'),
// 'host' => env('DB_HOST', 'localhost'),
// 'port' => env('DB_PORT', ''),
// 'socket' => '',
// 'database' => env('DB_DATABASE', 'laravel'),
// 'username' => env('DB_USERNAME', 'root'),
// 'password' => env('DB_PASSWORD', ''),
// 'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
),
),
Code: Select all
'resource' => array(
'db' => array(
'adapter' => env('DB_CONNECTION', 'mysql'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', ''),
'socket' => '',
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
),
),
Code: Select all
/*
'resource' => array(
'db' => array(
'adapter' => env('DB_CONNECTION', 'mysql'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', ''),
'socket' => '',
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'stmt' => array( "SET NAMES 'utf8'", "SET SESSION sql_mode='ANSI'" ),
),
),
*/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star