php dom 丢失内容,PHP DOMDocument丢失

运行$ dom = new DOMDocument(" 1.0"," utf-8");时出现奇怪的错误:

警告:require_once(classes / DOMDocument.class.php)[function.require-once]:无法打开流:/var/www/html/cms/bootstrap.php中第5行上没有这样的文件或目录

致命错误:require_once()[function.require]:无法打开所需的'classes / DOMDocument.class.php'(include_path ='。:/ usr / share / pear:/ usr / share / php:/ var / www / html / cms / plugins / Zend / library')在第5行的/var/www/html/cms/bootstrap.php中

根据php.net/manual/en/dom.setup.php,我需要安装php-xml。 我已经尝试过了,但它也出错了...

[user@lnxcmsdev cms]$ sudo yum install php-xml

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* addons: mirror.web-ster.com

* base: mirror.hmc.edu

* extras: mirror.hmc.edu

* rpmforge: ftp-stud.fht-esslingen.de

* updates: mirror.rocketinternet.net

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package php-xml.i386 0:5.1.6-27.el5_5.3 set to be updated

--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-xml

--> Finished Dependency Resolution

php-xml-5.1.6-27.el5_5.3.i386 from updates has depsolving problems

--> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-xml-5.1.6-27.el5_5.3.i386 (updates)

Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-xml-5.1.6-27.el5_5.3.i386 (updates)

You could try using --skip-broken to work around the problem

You could try running: package-cleanup --problems

package-cleanup --dupes

rpm -Va --nofiles --nodigest

The program package-cleanup is found in the yum-utils package.

[user@lnxcmsdev cms]$ sudo yum install php-common

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* addons: mirror.web-ster.com

* base: mirror.hmc.edu

* extras: mirror.hmc.edu

* rpmforge: ftp-stud.fht-esslingen.de

* updates: mirror.rocketinternet.net

Setting up Install Process

Package matching php-common-5.1.6-27.el5_5.3.i386 already installed. Checking for update.

Nothing to do

想法?

继承人的DOM要求-php.net/manual/en/dom.requirements.php。 另外,PHP 5.1.6现在已经很老了。 你应该考虑升级

您的问题是软件包管理器,而不是PHP。 手动下载RPM并使用rpm --nodeps --force php-xml*.rpm进行安装。

[user @ lnxcmsdev cm] $ sudo yum --enablerepo = webtatic install libxml设置安装过程没有可用的软件包libxml。 没事做

固定于:

sudo yum --enablerepo=webtatic install php-xml

sudo /sbin/service httpd stop

sudo /sbin/service httpd start

首先安装这个rpm

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

然后安装

sudo yum --enablerepo = webtatic安装php-xml

这应该100%有效。

我有同样的问题,我在Centos7上安装了php71 REMI。

我检查了这个:

yum install php-xml

但是它已安装,我收到此消息:

Package php-xml-7.1.4-1.el7.remi.x86_64 already installed and latest version

然后我尝试了一个:

yum install php71-php-xml

错过了,所以我得到了

Dependencies Resolved

=====================================

Package                    Arch                Version                        Repository         Size

=====================================

Installing:

php71-php-xml              x86_64              7.1.4-1.el7.remi               remi              164 k

Transaction Summary

=====================================

Install  1 Package

我回答是,并安装。

然后重启httpd2.4:

service httpd restart

然后问题解决了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值