PHP DOMDocument丢失 [英] PHP DOMDocument missing

查看:113
本文介绍了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

I am getting an odd error when running $dom = new DOMDocument("1.0", "utf-8");: Warning: require_once(classes/DOMDocument.class.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/cms/bootstrap.php on line 5

Fatal error: require_once() [function.require]: Failed opening required 'classes/DOMDocument.class.php' (include_path='.:/usr/share/pear:/usr/share/php:/var/www/html/cms/plugins/Zend/library') in /var/www/html/cms/bootstrap.php on line 5

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

According to php.net/manual/en/dom.setup.php, I need php-xml installed. I have tried this but it also errors out...

[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

想法?

推荐答案

固定于:

sudo yum --enablerepo=webtatic install php-xml
sudo /sbin/service httpd stop
sudo /sbin/service httpd start

这篇关于PHP DOMDocument丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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