无法获取HTTP在PHP工作 [英] Can't get http to work in php

查看:237
本文介绍了无法获取HTTP在PHP工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不断收到此错误:

PHP的警告:PHP启动:无法加载动态库'/usr/lib64/php/modules/http.so' - /usr/lib64/php/modules/http.so:未定义的符号:php_persistent_handle_abandon在不明就行0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/http.so' - /usr/lib64/php/modules/http.so: undefined symbol: php_persistent_handle_abandon in Unknown on line 0

PHP的致命错误:类'的Ht​​t presponse'在/var/www/api/init.php没有发现第4行

PHP Fatal error: Class 'HttpResponse' not found in /var/www/api/init.php on line 4

我已经通过PECL重新安装HTTP几十倍,甚至试图从tar.gz.安装它我运行一个EC2实例。

I've reinstalled http through pecl a few times, even tried installing it from the tar.gz. I'm running an EC2 instance.

我已经把延长= http.so在我的php.ini。

I HAVE put extension=http.so in my php.ini.

推荐答案

您可能得到pecl_http第2版,它有一些新的要求。请参阅安装说明。对我来说,这些线路的工作:

You probably got version 2 of pecl_http, and it has some new requirements. See the installation instructions. For me these lines worked:

extension=raphf.so
extension=propro.so
extension=http.so

编辑:的订购事宜,所以第一次尝试为我所用的相同的顺序。

Order matters, so first try the same order as I used.

我还相信http.so之后json.so加载另一个prerequisites。

I also made sure http.so is loaded after json.so and the other prerequisites.

这篇关于无法获取HTTP在PHP工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆