Issues discovered in My First Project 1.1
The following are errors found in http://www.symfony-project.org/tutorial/1_1/my-first-project. As errors are fixed, they may be edited out of this document, but readers are free to view previous versions should the old information prove helpful.
1
If you want to switch to MySQL for this project, just type the following command line: $ php symfony configure:database mysql://root:pa$$word@localhost/symfony_project Change the DSN argument to match your settings (username, password, host, and database name) and then create the database with the command line or a web interface (as described in the model chapter).
You also need to modify config/databases.yml: delete database, change phptype from sqlite to mysql
all:
propel:
class: sfPropelDatabase
param:
phptype: mysql
dsn: 'mysql://root:pa$$word@localhost/symfony_project'
Comments from "eustache": These changes must be done because the function execute() in the class sfConfigureDatabaseTask.class.php just updates the dns parameter, and leaves both the phptype and the database parameters unchanged.
What I did was to add this code after the line 82 of the sfConfigureDatabaseTask.class.php
$param_array = split("://",$arguments['dsn']);
$param["phptype"] = $param_array[0];
$param_array = split("/",$param_array[1]);
$param["database"] = $param_array[1];
and edit (in the same file):
-this line:
'param' => array_merge(isset($config[$options['env']][$options['name']]['param']) ? $config[$options['env']][$options['name']]['param'] : array(), array('dsn' => $arguments['dsn'])),
-to:
'param' => array_merge(isset($config[$options['env']][$options['name']]['param']) ? $config[$options['env']][$options['name']]['param'] : array(), array('dsn' => $arguments['dsn'],'phptype' => $param['phptype'],'database' => $param['database'])),
so each time you run:
$ php symfony configure:database mysql://root:pa$$word@localhost/symfony_project
these values will be updated from that string
2
There is no default 'pretty' css file (main.css is empty).