gpt4 book ai didi

php - 调用未定义函数 xml_parser_create()

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:26:30 25 4
gpt4 key购买 nike

你能帮我解决这个冲突吗?我正在尝试运行 xml_parse_create。
我的服务器配置:
[root@server ~]# php -v
PHP 7.0.22 (cli)(内置:2017 年 8 月 7 日 16:18:27)( NTS )

[root@server ~]# nginx -v
nginx版本:nginx/1.10.2

操作系统:CentOS 7.3.1611(核心)

我的 YUM 安装详情:

[root@server ~]# yum list installed | grep php
php70u-cli.x86_64 7.0.22-2.ius.centos7 @ius
php70u-common.x86_64 7.0.22-2.ius.centos7 @ius
php70u-fpm.x86_64 7.0.22-2.ius.centos7 @ius
php70u-fpm-nginx.noarch 7.0.22-2.ius.centos7 @ius
php70u-mysqlnd.x86_64 7.0.22-2.ius.centos7 @ius
php70u-pdo.x86_64 7.0.22-2.ius.centos7 @ius

调查详情如下:

我尝试在 test.php 中执行以下代码:

<?php
$xml_parser = xml_parser_create("");
print $xml_parser;<br>
?>

[root@server ~]# php/tmp/test.php
PHP fatal error :未捕获错误:调用未定义函数

[root@server ~]# sudo yum install php-xml
加载的插件:fastestmirror
从缓存的主机文件加载镜像速度
* 基地:repo1.ash.innoscale.net
* epel: fedora-epel.mirrors.tds.net
* 额外内容:mirror.es.its.nyu.edu
* ius: ius.mirror.constant.com
* remi-safe: repo1.ash.innoscale.net
* 更新:mirrors.advancedhosters.com
* webtatic: us-east.repo.webtatic.com
解决依赖关系
--> 运行事务检查
---> 将安装包 php-xml.x86_64 0:5.4.16-42.el7
--> 处理依赖:php-common(x86-64) = 5.4.16-42.el7 for package: php-xml-5.4.16-42.el7.x86_64
--> 运行事务检查
---> 将安装包 php-common.x86_64 0:5.4.16-42.el7
--> 处理冲突:php70u-common-7.0.22-2.ius.centos7.x86_64 conflicts php-common < 7.0.22
--> 完成依赖解析
错误:php70u-common 与 php-common-5.4.16-42.el7.x86_64 冲突
您可以尝试使用 --skip-broken 来解决这个问题
您可以尝试运行:rpm -Va --nofiles --nodigest

最佳答案

在 ubuntu 下你可以像@Tarun 指出的那样做

apt-get install php-xml
apt-get search php |grep xml

关于php - 调用未定义函数 xml_parser_create(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45912836/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com