XML Extension not found(未找到 XML 扩展)
问题描述
我有 centos 6.5 服务器,当我尝试使用 pecl 安装 php 扩展时,我收到以下错误:
I have centos 6.5 server and when I try to install php extension using pecl I get the following error:
XML Extension not found
所有文档都说默认包含这个扩展...为什么这个错误仍然存在?
All the documentations say that this extension is included by default... Why this error still exists?
推荐答案
根据对 php.net 的评论
某些 Linux 发行版没有包含在最低 PHP 包中的此扩展.它通常可以在可选"选项之一中找到.php-* 包.
Certain Linux distributions do not have this extension included in the minimum PHP package. It can usually be found in one of the "optional" php-* packages.
对于 CentOS,你需要运行 yum install php-xml,它提供了这个扩展.
For CentOS, you will need to run yum install php-xml, which provides this extension.
所以请尝试使用以下方式安装它:
So please try to install it using:
yum install php-xml
同时检查你的 php.ini 并确保扩展名没有被注释掉 ; 它应该被列为:
Also check your php.ini and make sure that the extension is not commented out with a ; it should be listed as:
extension=dom.so
为了绝对确定一个模块是否启用,你应该使用phpinfo()
In order to be absolutely sure whether or not a module is enabled you should use phpinfo()
这篇关于未找到 XML 扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:未找到 XML 扩展
基础教程推荐
- 在PHP中根据W3C规范Unicode 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何替换eregi() 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
