Laravel 5.2: The Process class relies on proc_open, which is not available on your PHP installation(Laravel 5.2:Process 类依赖于 proc_open,这在您的 PHP 安装中不可用)
问题描述
我使用 cron 作业使用 laravel 任务调度来做一些 CRUD 操作.在 localhost 和我的 Share-Hosting 服务器上,它工作了好几个月,直到最近我在我的 Share-Hosting 服务器上运行 cron 作业时不断收到此错误.我没有对共享托管服务器上的代码进行任何更改.
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 this error when I run cron job on my Share-Hosting server. I did not make any changes to the code on my Share-Hosting server.
[2017-07-14 09:16:02] production.ERROR: exception 'SymfonyComponentProcessExceptionRuntimeException' 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:
但是在本地主机上它工作正常.根据我在网上的发现,我尝试了以下方法.
But on localhost it works fine. Based on my finding online I have tried the following.
- 联系我的托管公司删除 proc_open 表单禁用 PHP 功能.
- 托管公司提供了自定义 php.ini 文件.我删除了所有 disable_functions
- 共享托管服务器已重新启动并清除缓存
这些都没有解决问题.我不确定接下来要尝试什么,因为同一个项目在不同的共享托管服务器上运行良好.
None of this fixed the issue. I am not sure of what next to try because the same project works fine on different Share-Hosting Server.
推荐答案
经过数周的尝试解决此错误.以下修复有效
After many weeks of trying to resolve this error. The following fixes worked
- 将项目从 Laravel 5.2 升级到 5.4
- 在 CPanel 上使用选择 PHP 版本"将 PHP 版本设置为 7
- 或者在 CPanel 上使用MultiPHP Manager"将 PHP 版本设置为 ea-php70
现在,cron 作业运行顺利.我希望这对某人有所帮助.
Now, cron job runs smoothly. I hope this helps someone.
这篇关于Laravel 5.2:Process 类依赖于 proc_open,这在您的 PHP 安装中不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Laravel 5.2:Process 类依赖于 proc_open,这在您的 PHP 安装中不可用


基础教程推荐
- 在PHP中根据W3C规范Unicode 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01