Syntax Error

Hi I’ve just started learning yii and for some reason when I try to create a new migrate table I get this error

On that line is this


),

the entire page is this




<?php


// This is the configuration for yiic console application.

// Any writable CConsoleApplication properties can be configured here.

return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

	'name'=>'My Console Application',


	// preloading 'log' component

	'preload'=>array('log'),


	// application components

	/*'components'=>array(

		'db'=>array(

			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',

		),*/

		// uncomment the following to use a MySQL database

		

		'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=trackstar',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => '',

			'charset' => 'utf8',

		),

		

		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning',

				),

			),

		),

	),

);



This should be a easy fix, check you parenthesis pair. You do have one extra "),".

I removed the extra )’

and I ended up with this error when I tried to create a table again

downloads\yii is where the downloaded version of yii that I got from yiiframework.com

I don’t think you mean to have ‘components’ commented out the way you have it.




        // application components

        /*'components'=>array(

                'db'=>array(

                        'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',

                ),*/

                // uncomment the following to use a MySQL database



Should probably be




        // application components

        'components'=>array(

                /*'db'=>array(

                        'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',

                ),*/

                // uncomment the following to use a MySQL database



And that being the case, you should probably add that ), back where it was since there will be a new array left opened.

OMG!!! That was the problem. I feel like an idiot. Thank you sooooo much

Good catch man!