I use cron job to do some CRUD operation using laravel Task Scheduling. On localhost and on my Share-Hosting server it worked fine for months until recently I keep getting t
For me removing cached version of config.php file solve problem(Laravel 6). go to bootstrap/cache/config.php and remove file. Also don't forget to change APP_URL to your domain address. PHP version should be as required by laravel version.
for shared host if you can't change php.ini, you should use laravel 5.8.
You can use this on your on risk:
/usr/local/bin/php -d "disable_functions=" /home/didappir/public_html/api/artisan schedule:run > /dev/null 2>&1
When Flare error reporting service enabled in debug mode you'll see this error
The solution is:
Publish flare config file
php artisan vendor:publish --tag=flare-config
in config/flare.php Set:
'reporting' => [
'anonymize_ips' => true,
'collect_git_information' => false,
'report_queries' => true,
'maximum_number_of_collected_queries' => 200,
'report_query_bindings' => true,
'report_view_data' => true,
],
'send_logs_as_events' => false,
It is because of Flare error reporting service enabled in debug mode There is a workaround for this.
Publish flare config file
php artisan vendor:publish --tag=flare-config
and in config/flare.php
Set
'collect_git_information' => false
'reporting' => [
'anonymize_ips' => true,
'collect_git_information' => false,
'report_queries' => true,
'maximum_number_of_collected_queries' => 200,
'report_query_bindings' => true,
'report_view_data' => true,
],
this error was making me crazy! ... finally I realized that I made a mistake in "routes/web.php" file, the controller-method that handles the route was wrongly set. I fixed that and the error disapeared.
// wrong one :
Route::get('test', 'TestController@test');
// fixed one :
Route::get('test', 'Panel\TestController@test');
so before doing any changes at your complicated configuration files, just make sure that you have the correct path for route controllers.
After many weeks of trying to resolve this error. The following fixes worked
Now, cron job runs smoothly. I hope this helps someone.