Reputation: 381
I created a laravel project using version 4.2.9 in my local computer. Then I used vaprobash
to set-up my vm
. My Vagrantfile
provisioned MySQL
, php5.5
, composer
and a composer package. I am using Mac OS X 10.9.4.
I was following laracast
tutorial and run this command in my local computer
php artisan generate:migration create_users_table --fields="username:string, email:string:unique, password:string(20), remember_token:string"
This resulted into an error
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"syntax error, unexpected ''database'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'","file":"\/Users\/xxxmexxx\/lampfolder\/laraproj\/app\/config\/database.php","line":51}}
I realized that I should have run it on my vm ssh
so I did. I vagrant ssh
then run the same command and got the same error. Now, it seems like I can not run any artisan commands. I tried
php artisan -v
Same error.
and these are the code starting from line 51 of database.php
'database' => __DIR__.'/../database/production.sqlite',
'prefix' => '',
),
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'laraproj',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
Line 51 should not even matter because I specified 'default' => 'mysql';
and lines 51 and 52 are parameters of sqlite
.
I need advise on how to proceed.
Should I vagrant destroy? Should I provisioned laravel project in my vm
as well? Should I delete my laravel instead? Or should I destroy my monitor instead? bec I am almost ready to do it.
Any help is much appreciated
Upvotes: 0
Views: 888
Reputation: 661
Something is missing before line 51, so presumably a comma is missing or a semicolon is there where there shouldn't be one. Unexpected anything is always caused by something before the actual displayed line.
Upvotes: 2