Question

I am doing the tutorial from Marco Pivetta for Ocramius and Zend, I am stuck at the step where I should validate the schema. (See here: Link to the tutorial ) So actually I am stuck at the same point like at this question, already asked on stackoverflow. The author on this question found the solution obviously, but for me it's not working. He writes

And, if you use gitBash don't forget if you have tested your APPLICATION_ENV variable in application.config.php like this tutorial Zf2 advances config setup do in bash_profile file.

export APPLICATION_ENV="development"

I did this in my application.config.php

$env = getenv('APP_ENV') ?: 'development';

// Use the $env value to determine which modules to load
$modules = array(
        'ZendDeveloperTools',
        'Application',
        'DoctrineModule',
        'DoctrineORMModule',
);
if ($env == 'production') {
    $modules[] = 'ZendDeveloperTools';
}

return array(
    'modules' => $modules,
[...]

But I still get the error

[PDOException] SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES)

I have to say though, I couldn't figure out what the author means with the

[... ] bash_profile file:

export APPLICATION_ENV="development

His sentence is written without regarding any grammatical sense.

So the problem is: Somehow my doctrine.local.php in the autoloads is ignored, I can't figure out why.

I am using GitBash for the ./vendor/bin/doctrine-module orm:validate-schema command.

Was it helpful?

Solution

Got it: Make sure you are using GitBash and ZendStudio in administrator mode -.-

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top