Invalid PHP DOMDocument

I get 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 a file or directory in /var/www/html/cms/bootstrap.php on line 5


Fatal error : require_once () [function.require]: Failed to open the 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

According to php.net/manual/en/dom.setup.php, I need to install php-xml. I tried this, but these are also errors ...

[ 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 

Ideas ??

+4
source share
3 answers

Fixed:

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

First set this rpm

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

Then install

sudo yum --enablerepo = webtatic install php-xml

This should work 100%.

+1
source

I had the same problem, I have php71 REMI installed on Centos7.

I checked this:

 yum install php-xml 

But it was installed, and I received this message:

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

Then I tried the following:

 yum install php71-php-xml 

And he was skipped, so I got

 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 

I answered β€œYes” and β€œInstalled”. Then restart httpd2.4:

 service httpd restart 

Then the problem was fixed.

0
source

Source: https://habr.com/ru/post/1345971/


All Articles