-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: SQLSTATE[08006] [7] invalid connection option "name" #474
Comments
dbname |
It must be 'dbname' => 'wxservice', |
sorry, change 'name' to 'dbname' error still. display: run: display: |
Are you changing it on your config.php file? |
I‘m sure, Only error occurred in use phalcon tools. <?php
return new \Phalcon\Config(array(
'database' => array(
'adapter' => 'Postgresql',
'host' => 'localhost',
'username' => 'postgres',
'password' => '123456',
'dbname' => 'wxservice',
),
'application' => array(
'apiDir' => __DIR__ . '/../../app/api/',
'controllersDir' => __DIR__ . '/../../app/controllers/',
'modelsDir' => __DIR__ . '/../../app/models/',
'viewsDir' => __DIR__ . '/../../app/views/',
'pluginsDir' => __DIR__ . '/../../app/plugins/',
'libraryDir' => __DIR__ . '/../../app/library/',
'baseUri' => '/',
),
'models' => array(
'metadata' => array(
'adapter' => 'Memory'
)
)
)); And document has inconsistency: Sets a list of attributes that must be skipped from the generated INSERT statement <?php
class Robots extends \Phalcon\Mvc\Model
{
public function initialize()
{
$this->skipAttributesOnUpdate(array('created_at'));
}
} |
System:Ubuntu12.04 |
be sure to call in the bootstrap file (index.php) your adapter the right way: $di->set('db', function() use ($config) {
return new \Phalcon\Db\Adapter\Pdo\Postgresql(array(
"host" => $config->database->host,
"username" => $config->database->username,
"password" => $config->database->password,
"dbname" => $config->database->dbname
));
}); |
The text was updated successfully, but these errors were encountered: