0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ConoHa で立ち上げた Laravel イメージだと ZipArchive が使えなかった。

Posted at

状況

手元の Homestead 上では普通に使えてたので、気にせず開発していたのだけど、デプロイしたらエラー吐いたので困った。
とりあえず拡張を確認する。

$ php --ri zip
Extension 'zip' not present.

ないね。

環境

  • ConoHa VPS Laravel イメージ
  • PHP 7.2.16
  • Laravel Framework 5.8.36
  • CentOS Linux release 7.6.1810 (Core)
  • yum リポジトリは remi-php72 と remi-safe が使える

インストール

$ sudo yum install --enablerepo=remi,remi-php72 php-pecl-zip

apache 再起動

$ sudo systemctl restart httpd.service

確認

$ php --ri zip

zip

Zip => enabled
Zip version => 1.19.0
Libzip headers version => 1.7.0
Libzip library version => 1.7.3
BZIP2 compression => Yes
XZ compression => Yes
AES-128 encryption => Yes
AES-192 encryption => Yes
AES-256 encryption => Yes
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?