Fatal error: Class 'ZipArchive' not found in

后端 未结 20 1378
既然无缘
既然无缘 2020-11-27 03:39

I have a problem that I install \'Archive_Zip 0.1.1\' on Linux server, but when I try to run the script to create the zip file it gives the fatal error

<
20条回答
  •  迷失自我
    2020-11-27 03:56

    For Centos 7 and PHP 7.3 on Remi

    Search for the zip extension:

    $ yum search php73 | grep zip
    php73-php-pecl-zip.x86_64 : A ZIP archive management extension
    

    The extension name is php73-php-pecl-zip.x86_64. To install it in server running single version of PHP, remove the prefix php73:

    $ sudo yum --enablerepo=remi-php73 install php-pecl-zip #for server running single PHP7.3 version
    $ #sudo yum --enablerepo=remi-php73 install php73-php-pecl-zip # for server running multiple PHP versions
    

    Restart PHP:

    $ sudo systemctl restart php-fpm
    

    Check installed PHP extensions:

    $ php -m
    [PHP Modules]
    apcu
    bcmath
    bz2
    ...
    zip
    zlib
    

提交回复
热议问题