DB:seed file for Laravel 4 working fine on local host, not working on Mediatemple gridserver? -


i have laravel 4 db:seed file trying use on mediatemple gridserver. able run migration artisan fine (php artisan migrate), , make tables, not able seed tables. database seeding worked fine on local host. on live server experiencing issues it. here seed file:

artiststableseeder.php:  class artiststableseeder extends seeder {      public function run()     {         // uncomment below wipe table clean before populating         // db::table('artists')->delete();          $artists = array(          );          $artists = [             ['stage_name' => 'blah', 'city' => 'blah', 'state' => 'blah', 'video_path' => 'youtube.com', 'image_path' => 'filepickerimage', 'soundcloud_profile' => 'https://soundcloud.com/', 'description' => '', 'created_at' => new datetime, 'updated_at' => new datetime]           ];          // uncomment below run seeder         db::table('artists')->insert($artists);     }  } 

it spitting out error:

{"error":{"type":"symfony\\component\\debug\\exception\\fatalerrorexception","message":"syntax error, unexpected '['","file":"\/nfs\/c09\/h04\/mnt\/139243\/domains\/crowdsets.com\/html\/app\/database\/seeds\/artiststableseeder.php","linemichaelsutyak.com@n26:/home/139243/domains/crowdsets.com/html$ php artisan db:seed 

it complaining line starts array:

$artists = [ 

i have no idea why happening. little appreciated. thank you!

that syntax error caused feature has been added in php 5.4 (short array syntax), i'd guess hoster still runs 5.3.x. should check php version on mediatemple grid server , update if necessary.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -