PHP无法加载PECL HTTP扩展 [英] php cannot load pecl http extension

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

问题描述

我已经安装了Plesk服务器(这似乎是成功的)上pecl_http但由于某些原因,HTTP扩展不会加载到PHP中。

I have installed pecl_http on a PLESK server (which seems to be successful) but for some reason, the http extension will not load into PHP.

var_dump(extension_loaded("http"));

给我布尔(假)。

gives me bool(false).

PECL信息pecl_http 给我很多信​​息,如果我跑 PHP -me HTTP是同时上市。

pecl info pecl_http gives me a lot of info and if I run php -me http is also listed.

PHP -i | grep的HTTP_REQUEST给我:

php -i | grep "http_request" gives me:

http_request => N/A => 0 => 0
http_request_datashare => GLOBAL => 1 => 0
http_request_pool => N/A  => 0 => 0

和我办 PECL运行测试-p pecl_http 我得到了很多失败的

and if I run pecl run-tests -p pecl_http I get a lot of FAILs

和我也越来越

Fatal error: Call to undefined function http_get()

http.so位于内部/ usr / lib目录/ PHP /模块/这也被定义为php.ini中的扩展DIR - 所有其他扩展加载罚款

http.so is located inside /usr/lib/php/modules/ which is also defined as the extension dir in php.ini - all other extensions loads fine.

什么我错过了?

推荐答案

如果改变,会发生什么

enable_dl = Off 

enable_dl = On 

在php.ini和运行

in php.ini and run

php -r "dl('http.so');" 

这篇关于PHP无法加载PECL HTTP扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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