Seu*_*ope 8 php cron cpanel laravel-5.2
我使用cron job来使用laravel Task Scheduling进行一些CRUD操作.在localhost和我的Share-Hosting服务器上,它运行良好数月,直到最近我在我的Share-Hosting服务器上运行cron作业时仍然遇到此错误.我没有对我的Share-Hosting服务器上的代码进行任何更改.
[2017-07-14 09:16:02] production.ERROR: exception 'Symfony\Component\Process\Exception\RuntimeException' with message 'The Process class relies on proc_open, which is not available on your PHP installation.' in /home/xxx/xx/vendor/symfony/process/Process.php:144
Stack trace:
Run Code Online (Sandbox Code Playgroud)
但是在localhost上运行正常.根据我在网上的发现,我尝试了以下内容.
这些都没有解决这个问题.我不确定接下来会尝试什么,因为相同的项目在不同的Share-Hosting Server上运行良好.
Mah*_*our 10
这是因为在调试模式下启用了 Flare 错误报告服务有一个解决方法。
发布耀斑配置文件
php artisan vendor:publish --tag=flare-config
并在 config/flare.php
放
'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,
],
Run Code Online (Sandbox Code Playgroud)
经过数周试图解决此错误.以下修复工作正常
现在,cron工作顺利进行.我希望这可以帮助别人.
您可以自担风险使用它:
/usr/local/bin/php -d "disable_functions=" /home/didappir/public_html/api/artisan schedule:run > /dev/null 2>&1
Run Code Online (Sandbox Code Playgroud)