Question

I'm new to Symfony and I'm going through the Jobeet tutorial v1.4 for Doctrine. I am currently stuck on Day 3. I've followed all the instructions on configuring the database and building models and modules; however, when I try to access "http://localhost:8080/frontend_dev.php" I receive the following error:

'Configuration "config/databases.yml" does not exist or is unreadable.'

My config/databases.yml file looks like this:

all:  
  doctrine:  
  class: sfDoctrineDatabase  
  param:  
    dsn: 'mysql:host=localhost;dbname=jobeet'  
    username: root  
    password: mysecret

Creating the tables and loading the fixtures seem to work fine after checking the database with phpmyadmin. Any help would be appreciated.

Thank you!

Was it helpful?

Solution

I tried what's in the Jobeet from Day 1 to 3 and it works on my local machine, maybe what you have there is some file permission issue that is preventing your symfony to load the config/databases.yml so please change permissions as needed (chmod in linux).

Not sure if this will solve the problem but I think this is worth to try, execute php symfony cc or simply clear the cache folder and load up again your app in the browser, since the config/databases.yml is to be cached as config_databases.yml.php (you can take a look on /cache/frontend/dev/config/)

OTHER TIPS

phpmyadmin? arrggggghhhhhhh =P

Anyway, your identation is wrong.

It should be like this:

all:
  doctrine:
    class:  sfDoctrineDatabase
    param:
      dsn: "mysql:host=localhost;dbname=jobeet"
      username: root
      password: mysecret

As for the error, if you're on a mac, change the permissions using chmod. :-)

If you're stuck on a problem with databases.yml, this symfony databases.yml configuration reference could be useful: www.symfonyreference.com/databases-yml

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