Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony deploying issue
    primarykey
    data
    text
    <p>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:</p> <pre> >> 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 </pre> <p>However after the error it creates the table successfully. But if I run the command second times it fails partially while crating the tables. </p> <p>I have changed my database.yml configuration properly for the production environment. here it is:</p> <pre> all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=sf_project port: 3306 username: root password: mainserver </pre> <p>Its working right in the local environment though. Can some one shed some light on it ? </p> <p><strong>Editing note: added the content of '/cache//prod/config/config_databases.yml.php' file as 'xzyfer' suggested.</strong></p> <p>Here's the content :</p> <pre> return array( 'doctrine' => new sfDoctrineDatabase(array ( 'dsn' => 'mysql:host=localhost; dbname=sf_project', 'port' => 3306, 'username' => 'root', 'password' => 'mainserver', 'name' => 'doctrine', )),); </pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload