Vote Up 0 Vote Down

could not parse dsn doctrine

I am using zend framework with doctrine. I am getting this error :

"could not parse dsn doctrine". What will be the solution ?
flag

Answers


Vote Up 0 Vote Down
replace

doctrine.connection_string = “mysql://root:testing@localhost/thenextsocial”


with

doctrine.dsn = “mysql://root:testing@localhost/thenextsocial”


and in bootstrap replace

//connect to database
$manager->openConnection($doctrineConfig['connection_string']);


with

$manager->openConnection($doctrineConfig['dsn']);
flag | link |
Vote Up 0 Vote Down
All of the references to

 resources.doctrine.connection\_string


need to be changed to

 doctrine.connection\_string


eg:

;Doctrine settings
doctrine.connection\_string = “mysql://[USERNAME]:[PASSWORD]@[DBHOST]/[DBNAME]”
doctrine.models\_path = APPLICATION\_PATH “/models”
doctrine.generate\_models\_options.pearStyle = true
doctrine.generate\_models\_options.generateTableClasses = true
doctrine.generate\_models\_options.generateBaseClasses = true
doctrine.generate\_models\_options.classPrefix = “Model\_”
doctrine.generate\_models\_options.baseClassPrefix = “Base\_”
doctrine.generate\_models\_options.baseClassesDirectory =
doctrine.generate\_models\_options.classPrefixFiles = false
doctrine.generate\_models_options.generateAccessors = false


. ..
flag | link |
Vote Up 0 Vote Down
change this

 doctrine.connection\_string = "mysql://root:testing@localhost/thenextsocial"
doctrine.models\_path = APPLICATION\_PATH "/models"
doctrine.generate\_models\_options.pearStyle = true
doctrine.generate\_models\_options.generateTableClasses = true
doctrine.generate\_models\_options.generateBaseClasses = true
doctrine.generate\_models\_options.classPrefix = "Model\_"
doctrine.generate\_models\_options.baseClassPrefix = "Base\_"
doctrine.generate\_models\_options.baseClassesDirectory =
doctrine.generate\_models\_options.classPrefixFiles = false
doctrine.generate\_models\_options.generateAccessors = false


to this

 resources.doctrine.connection\_string = "mysql://[replace with db username]:[replace with db password]@localhost/thenextsocial"
resources.doctrine.models\_path = APPLICATION\_PATH "/models"
resources.doctrine.generate\_models\_options.pearStyle = true
resources.doctrine.generate\_models\_options.generateTableClasses = true
resources.doctrine.generate\_models\_options.generateBaseClasses = true
resources.doctrine.generate\_models\_options.classPrefix = "Model\_"
resources.doctrine.generate\_models\_options.baseClassPrefix = "Base\_"
resources.doctrine.generate\_models\_options.baseClassesDirectory =
resources.doctrine.generate\_models\_options.classPrefixFiles = false
resources.doctrine.generate\_models\_options.generateAccessors = false


. ..
flag | link |

Your Answer

Login before answering

Login with facebook