LoginSignup
0
0

More than 5 years have passed since last update.

“Fatal error: Class ‘DOMDocument’ not found”

Last updated at Posted at 2015-12-09

概要

apacheで動いているWEBサーバーの保守契約終了のため新サーバーへ移行中
折角だからnginxにしてみたところ、動作しないコンテンツが出てきたので
調査したところ、あるPHPファイル内でXMLを読み取り処理する関数があり
このメッセージが出ていた。

表面的なメッセージは500 Internal Server Errorが表示されていたので
Chromeのデベロッパーツールで詳しく確認した。

原因

php-xmlのインストール忘れ

対応

CentOS6にremi リポジトリを追加してphp-5.6をインストールしているので
yum install --enablerepo=remi php-xml
でインストールする。

自分の環境ではなぜかBaseリポジトリが参照されてしまうので
一旦リポジトリ参照をクリアした後、remiを見るように
yum install --disablerepo=* --enablerepo=remi-php56 install php-xml
でインストールした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0