K
K
krispey1022021-06-10 17:33:35
PHP
krispey102, 2021-06-10 17:33:35

PHP Spout not working error Class 'ZipArchive' not found (0)?

I connect the module so that from the site admin panel you can upload Excel to the site. But it throws an error:

[Error] 
Class 'ZipArchive' not found (0)
/srv/avantmedia/local/vendor/box/spout/src/Spout/Reader/XLSX/Creator/InternalEntityFactory.php:143
#0: Box\Spout\Reader\XLSX\Creator\InternalEntityFactory->createZipArchive()
  /srv/avantmedia/local/vendor/box/spout/src/Spout/Reader/XLSX/Reader.php:84
#1: Box\Spout\Reader\XLSX\Reader->openReader(string)
  /srv/avantmedia/local/vendor/box/spout/src/Spout/Reader/ReaderAbstract.php:127
#2: Box\Spout\Reader\ReaderAbstract->open(string)
  /srv/avantmedia/local/php_interface/include/service-import.php:117
#3: require_once(string)
  /srv/avantmedia/bitrix/admin/service-import.php:1

What could be wrong? On a php 7.2 server, it looks like the ZipArchive module automatically goes

$php -m:
here is the full list:
[PHP Modules]
calendar
Core
ctype
date
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Yuriev, 2021-06-10
@krispey102

Class 'ZipArchive' not found

you don't have php-zip module
https://www.php.net/manual/ru/book.zip.php
like the ZipArchive module automatically goes

you thought

T
ThunderCat, 2021-06-10
@ThunderCat

On php 7.2 server
Right?
What could be wrong?
How to find out which php libraries are included?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question