You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding the previous line to crontab to let the scheduler run, even if there is no instruction in the function schedule in the file Console/Kernel.php, the following error is raised anytime cron launches the schedule (in this case every minute, two tries and then i stopped cron).
No errors if php artisan schedule:run is launched directly from terminal, and no problems at all with the package functionalities (i can receive webhooks properly).
Yes, you were right.
After a while I figured out that php launched in the terminal was not the one launched by cron.
To verify it, I simply added a crontab entry that writes to a file the result of the command 'which php' and I discovered the difference.
In case some other people run into this problem, it's enough to change the crontab entry
from: * * * * * cd /Library/WebServer/Documents/Foo/Bar && php artisan schedule:run >> /dev/null 2>&1
to: * * * * * cd /Library/WebServer/Documents/Foo/Bar && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1
Hallo everyone,
OSx catalina 10.15.4,
PHP 7.4.4,
Laravel (framework 7.9.2) fresh installation, only laravel-webhook-client package installed,
crontab entry: * * * * * cd /Library/WebServer/Documents/Foo/Bar && php artisan schedule:run >> /dev/null 2>&1
Adding the previous line to crontab to let the scheduler run, even if there is no instruction in the function schedule in the file Console/Kernel.php, the following error is raised anytime cron launches the schedule (in this case every minute, two tries and then i stopped cron).
No errors if php artisan schedule:run is launched directly from terminal, and no problems at all with the package functionalities (i can receive webhooks properly).
[2020-05-03 07:23:01] local.ERROR: syntax error, unexpected '$url' (T_VARIABLE), expecting ')' {"exception":"[object] (ParseError(code: 0): syntax error, unexpected '$url' (T_VARIABLE), expecting ')' at /Library/WebServer/Documents/IIC/FakeWebhook/vendor/spatie/laravel-webhook-client/src/WebhookClientServiceProvider.php:28)
[stacktrace]
#0 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/Library/WebSer...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Spatie\\WebhookC...')
#2 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(690): spl_autoload_call('Spatie\\WebhookC...')
#3 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(624): Illuminate\Foundation\Application->resolveProvider('Spatie\\WebhookC...')
#4 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\Foundation\Application->register('Spatie\\WebhookC...')
#5 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(604): Illuminate\Foundation\ProviderRepository->load(Array)
#6 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders()
#7 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(230): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap(Object(Illuminate\Foundation\Application))
#8 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#9 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 /Library/WebServer/Documents/IIC/FakeWebhook/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 {main}
"}
[2020-05-03 07:24:00] local.ERROR: syntax error, unexpected '$url' (T_VARIABLE), expecting ')' {"exception":"[object] (ParseError(code: 0): syntax error, unexpected '$url' (T_VARIABLE), expecting ')' at /Library/WebServer/Documents/IIC/FakeWebhook/vendor/spatie/laravel-webhook-client/src/WebhookClientServiceProvider.php:28)
[stacktrace]
#0 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/Library/WebSer...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Spatie\\WebhookC...')
#2 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(690): spl_autoload_call('Spatie\\WebhookC...')
#3 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(624): Illuminate\Foundation\Application->resolveProvider('Spatie\\WebhookC...')
#4 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\Foundation\Application->register('Spatie\\WebhookC...')
#5 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(604): Illuminate\Foundation\ProviderRepository->load(Array)
#6 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders()
#7 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(230): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap(Object(Illuminate\Foundation\Application))
#8 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#9 /Library/WebServer/Documents/IIC/FakeWebhook/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 /Library/WebServer/Documents/IIC/FakeWebhook/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 {main}
"}
I think it's worth an investigation :)
Thank you All,
Andrea
The text was updated successfully, but these errors were encountered: