安装 XML_RPC2 期间出错
我正在尝试从 PEAR 库安装 XML_RPC2 包,但是每当我键入正确的命令(pear install XML_RPC2)时,我都会收到错误:
pear/XML_RPC2 requires PHP extension "curl"
No valid packages found
install faild
奇怪的是,命令
$ pear package-dependencies xml_rpc2
返回信息“此包没有任何依赖项”(在任何环境中都可以正常工作)其他情况)。
我也尝试过旧版本的 XML_RPC2 - 同样的事情。这是我遇到问题的第一个包裹。 我确信curl 已启用并且它可以工作(经过测试)。除此之外,我还安装了依赖项列表中列出的所有其他组件(PHP 5.3、PEAR 1.9.2、Cache_Lite 1.7.9)。 我正在 Windows XP 上进行标准 WAMP 安装。
我将不胜感激任何帮助:)
编辑。
最终解决方案:WAMP 有两个 php.ini 位置,一个用于 php 脚本,一个用于控制台命令。第一个位于apache目录中(即wamp/bin/apache/apache2.2.21),第二个位于php目录中(即wamp/bin/php/php5.3)。如果您使用 WAMP 托盘图标(PHP 扩展或 php.ini)中的选项启用模块,则您正在编辑 apache 目录中的 php.ini 文件,因此它将仅对浏览器运行的脚本生效,而不是命令行运行的脚本。
I'm trying to install XML_RPC2 package from PEAR library, but whenever I type a proper command (pear install XML_RPC2) I'm getting an error:
pear/XML_RPC2 requires PHP extension "curl"
No valid packages found
install faild
Strangely enough command
$ pear package-dependencies xml_rpc2
returns information "this package does not have any dependencies" (works fine in any other case).
I've also tried with older versions of XML_RPC2 - same thing. It's the first packege I have problem with.
I'm sure curl is enabled and it's work(tested). Beside that I have installed all others components listed on dependencies list(PHP 5.3, PEAR 1.9.2, Cache_Lite 1.7.9).
I'm working on standard WAMP installtion on Windows XP.
I'll be grateful for any help:)
Edit.
Final solution: WAMP has two locations of php.ini, one used by php scripts and one for console commands. The first one is located in a apache directory (ie wamp/bin/apache/apache2.2.21) and the second one is in the php directory (ie wamp/bin/php/php5.3). If you're enabling modules using options in WAMP's tray icon (PHP extensions or php.ini) you are editing php.ini file in apache directory so it will take effect only on script runed by a browser and not by a command line.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“cURL”是一个扩展,而不是一个(PEAR-)包。有关安装说明,请参阅手册。
"cURL" is an extension, not a (PEAR-)package. See Manual for installation instructions.
有同样的问题
在 cmd 行上
1):这将显示卷曲扩展是否启用。你可以检查你的 php.ini 并发现它已启用,但只有 php -me 会告诉你是否有问题。
2) 用户 pear config-show
这将列出您的 pear 配置。确保 ext_dir 指向您的 php 扩展所在的位置:
3) 确保所有 pear 设置正确,否则使用 pear 配置集来更正它们(例如 ext_dir)
如果您确定启用了 curl 扩展,只需安装XML_RPC2 使用 nodeps 选项
那么你应该没问题。
Had this very same issue
1) on the cmd line:
this will show you weather the curl extension is enabled or not. you may check your php.ini and find out that it's enable but only php -me will tell if there is a problem.
2) user pear config-show
this will list your pear configuration. make sure that ext_dir is pointing to where your php extensions are located:
3) make sure all your pear settings are correct otherwise use the pear config-set to correct them (e.g ext_dir)
If you are sure about the curl extension being enabled just install XML_RPC2 using the nodeps option
Then you should be fine.