メンテナンス・トラブルシュート - PHP - PHP 7.2 - Call to undefined function gzinflate()

 クラウディア
1. 概要
2. 調査
3. 対応

1. 概要

 「WordPress」は動いていると思っていたら「ダッシュボード」を表示しようとすると

[Mon Jul 09 18:35:47.494588 2018] [php7:error] [pid 28172] [client 126.245.12.181:18294] PHP Fatal error:  Uncaught Error: Call to undefined function gzinflate() in /パス/ソースファイル:947\nStack trace:\n#0 以下、スタックトレースの表示
 というのが出力されて、空白のページが表示されます。

2. 調査

 途方に暮れそうになっていましたが「ソースで LAMP 構築+WordPress」というページに有用な記事を発見!
gzinflateという関数が無いよ、というエラーのようです。
この関数を扱えるように、–with-zlibというコンパイルオプションを付与してPHPを再インストールします。
 なるほど。

3. 対応

 「ports」でいうと
/usr/ports/lang/php72-extensions
 の「ZLIB」オプションなわけだ。
「/usr/ports/lang/php72-extensions」-「make config」

 早速


cd /usr/ports/lang/php72-extensions/
make config							←	ここで「ZLIB」にチェック
make clean
make
make deinstall
make install
 で

service apache24 configtest
service apache24 restart
 これで、無事、「WordPress」の「ダッシュボード」が表示できるようになりました。