Problem with php artisan command in server
Hey guys, When i try to create a corn job on my server with following command
php /home/myusername/public_html/artisan schedule:run >> /dev/null 2>&1
This error happens: Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/myusername/public_html/artisan on line 31
I use laravel 5 package and my php version is 5.6 In similar post, someone suggested that sometimes php version is set to 5.5.9 or higher, but php-cli version is lower than 5.5.9, and that creates issue. I don't know how to get php cli version and how to change it, and unfortunately my server support is (let's just say) not helpfull. Please help me out here, corn job is critical to my app and i don't have much time. tanx
Please or to participate in this conversation.