Symfony deploying issue

Posted by medhad on Stack Overflow See other posts from Stack Overflow or by medhad
Published on 2011-03-01T07:07:50Z Indexed on 2011/03/01 7:24 UTC
Read the original article Hit count: 177

Filed under:

I have some problem while configuring symfony project on the production server. When I run the command doctrine --build --all --and-load it gives me error in the production environment:

   
>> doctrine  Dropping "doctrine" database
PHP Notice:  Undefined index:  dbname in /var/www/sf_project/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1472

Notice: Undefined index:  dbname in /var/www/sf_project/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1472
>> doctrine  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an erro...e right syntax to use near '' at line 1. Failing Query: "DROP DATABASE "
>> doctrine  Creating "dev" environment "doctrine" database
PHP Notice:  Undefined index:  dbname in /var/www/sf_project/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1439

However after the error it creates the table successfully. But if I run the command second times it fails partially while crating the tables.

I have changed my database.yml configuration properly for the production environment. here it is:

all:
  doctrine:
    class: sfDoctrineDatabase
    param:
      dsn: mysql:host=localhost;dbname=sf_project
      port: 3306
      username: root
      password: mainserver

Its working right in the local environment though. Can some one shed some light on it ?

© Stack Overflow or respective owner

Related posts about symfony