如何安装 php 的zip模块-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

如何安装 php 的zip模块

奎因宅 2016-06-29 12:32:57 5116

如何安装 php 的zip模块,详细方法。

我按照下面方法安装:
cd /usr/src

wget http://pecl.php.net/get/zip

tar -zxvf zip

cd zip-1.x.x

phpize

./configure

make

sudo make instal

然后出现问题:

make test

PHP Warning: Module 'zip' already loaded in Unknown on line 0
PHP Warning: Module 'zip' already loaded in Unknown on line 0

=====================================================================
PHP : /alidata/server/php/bin/php
Warning: Module 'zip' already loaded in Unknown on line 0

PHP_SAPI : cli
PHP_VERSION : 5.5.7
ZEND_VERSION: 2.5.0
PHP_OS : Linux - Linux AY1404081052536468d9Z 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64
INI actual : /usr/src/zip-1.13.3/tmp-php.ini
More .INIs :
CWD : /usr/src/zip-1.13.3
Extra dirs :

VALGRIND : Not used

TIME START 2016-06-29 12:27:35

FAIL Check for zip presence [tests/001.phpt]
FAIL Bug #11216 (::addEmptyDir() crashes when the directory already exists) [tests/bug11216.phpt]
FAIL Bug #14962 (::extractTo second argument is not really optional) [tests/bug14962.phpt]
FAIL #38943, properties in extended class cannot be set (5.3+) [tests/bug38943.phpt]
FAIL #38943, properties in extended class cannot be set (5.3) [tests/bug38943_2.phpt]
FAIL Bug #38944 (newly created ZipArchive segfaults when accessing comment property) [tests/bug38944.phpt]
FAIL Bug #40228 (extractTo does not create recursive empty path) [tests/bug40228.phpt]
FAIL Bug #47667 (ZipArchive::OVERWRITE seems to have no effect) [tests/bug47667.phpt]
FAIL Bug #49072 (feof never returns true for damaged file in zip) [tests/bug49072.phpt]
SKIP Bug #51353 ZIP64 problem, archive with 100000 items [tests/bug51353.phpt] reason: the test might get very long, activate it manually
FAIL Bug #53579 (stream_get_contents() segfaults on ziparchive streams) [tests/bug53579.phpt]
FAIL Bug #53603 (ZipArchive should quiet stat errors) [tests/bug53603.phpt]
FAIL Bug #53854 (Missing constants for compression type) [tests/bug53854.phpt]
FAIL Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive) [tests/bug53885.phpt]
FAIL Bug #64342 ZipArchive::addFile() has to check file existence (variation 1) [tests/bug64342_0.phpt]
FAIL Bug #64342 ZipArchive::addFile() has to check file existence (variation 2) [tests/bug64342_1.phpt]
FAIL Bug #70322 (ZipArchive::close() doesn't indicate errors) [tests/bug70322.phpt]
FAIL Bug #70350 (ZipArchive::extractTo allows for directory traversal when creating directories) [tests/bug70350.phpt]
FAIL Bug #7214 (zip_entry_read() binary safe) [tests/bug7214.phpt]
FAIL Bug #72258 ZipArchive converts filenames to unrecoverable form [tests/bug72258.phpt]
FAIL Bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize [tests/bug72434.phpt]
FAIL Bug #7658 (modify archive with general bit flag 3 set) [tests/bug7658.phpt]
FAIL Bug #8009 (cannot add again same entry to an archive) [tests/bug8009.phpt]
FAIL Bug #8700 (getFromIndex(0) fails) [tests/bug8700.phpt]
FAIL Recognition of compression methods [tests/compression_methods.phpt]
FAIL close() called twice [tests/doubleclose.phpt]
FAIL ziparchive::addEmptyDir [tests/oo_addemptydir.phpt]
FAIL ziparchive::addFile() function [tests/oo_addfile.phpt]
FAIL ZipArchive::addGlob() method [tests/oo_addglob.phpt]
FAIL ZipArchive::addPattern() method [tests/oo_addpattern.phpt]
FAIL zip::close() function [tests/oo_close.phpt]
FAIL Delete entries [tests/oo_delete.phpt]
FAIL Extending Zip class and array property [tests/oo_ext_zip.phpt]
FAIL ZipArchive::ExternalAttributes() function [tests/oo_externalattributes.phpt]
FAIL extractTo [tests/oo_extract.phpt]
FAIL getComment [tests/oo_getcomment.phpt]
FAIL getNameIndex [tests/oo_getnameindex.phpt]
FAIL This test will test getStatusString method in ZipArchive [tests/oo_getstatusstring.phpt]
FAIL Locate entries by name [tests/oo_namelocate.phpt]
FAIL zip::open() function [tests/oo_open.phpt]
FAIL ziparchive::properties isset()/empty() checks [tests/oo_properties.phpt]
FAIL Rename entries [tests/oo_rename.phpt]
FAIL setComment [tests/oo_setcomment.phpt]
FAIL setCompressionName and setCompressionIndex methods [tests/oo_setcompression.phpt]
FAIL getStream [tests/oo_stream.phpt]
FAIL Bug #12414 ( extracting files from damaged archives) [tests/pecl12414.phpt]
FAIL stream_get_meta_data() on zip stream [tests/stream_meta_data.phpt]
FAIL zip_close() function [tests/zip_close.phpt]
FAIL zip_entry_close() function: simple and double call [tests/zip_entry_close.phpt]
FAIL zip_entry_compressedsize() function [tests/zip_entry_compressedsize.phpt]
FAIL zip_entry_compressionmethod() function [tests/zip_entry_compressionmethod.phpt]
FAIL zip_entry_filesize() function [tests/zip_entry_filesize.phpt]
FAIL zip_entry_name() function [tests/zip_entry_name.phpt]
FAIL zip_entry_open() function [tests/zip_entry_open.phpt]
FAIL zip_entry_read() function [tests/zip_entry_read.phpt]
FAIL zip_open() function [tests/zip_open.phpt]
FAIL zip_open() error conditions [tests/zip_open_error.phpt]

FAIL zip_read() function [tests/zip_read.phpt]

TIME END 2016-06-29 12:27:37

=====================================================================

TEST RESULT SUMMARY

Exts skipped : 0

Exts tested : 43

Number of tests : 58 57
Tests skipped : 1 ( 1.7%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 57 ( 98.3%) (100.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)

Tests passed : 0 ( 0.0%) ( 0.0%)

Time taken : 2 seconds

=====================================================================

FAILED TEST SUMMARY

Check for zip presence [tests/001.phpt]
Bug #11216 (::addEmptyDir() crashes when the directory already exists) [tests/bug11216.phpt]
Bug #14962 (::extractTo second argument is not really optional) [tests/bug14962.phpt]

38943, properties in extended class cannot be set (5.3+) [tests/bug38943.phpt]

38943, properties in extended class cannot be set (5.3) [tests/bug38943_2.phpt]

Bug #38944 (newly created ZipArchive segfaults when accessing comment property) [tests/bug38944.phpt]
Bug #40228 (extractTo does not create recursive empty path) [tests/bug40228.phpt]
Bug #47667 (ZipArchive::OVERWRITE seems to have no effect) [tests/bug47667.phpt]
Bug #49072 (feof never returns true for damaged file in zip) [tests/bug49072.phpt]
Bug #53579 (stream_get_contents() segfaults on ziparchive streams) [tests/bug53579.phpt]
Bug #53603 (ZipArchive should quiet stat errors) [tests/bug53603.phpt]
Bug #53854 (Missing constants for compression type) [tests/bug53854.phpt]
Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive) [tests/bug53885.phpt]
Bug #64342 ZipArchive::addFile() has to check file existence (variation 1) [tests/bug64342_0.phpt]
Bug #64342 ZipArchive::addFile() has to check file existence (variation 2) [tests/bug64342_1.phpt]
Bug #70322 (ZipArchive::close() doesn't indicate errors) [tests/bug70322.phpt]
Bug #70350 (ZipArchive::extractTo allows for directory traversal when creating directories) [tests/bug70350.phpt]
Bug #7214 (zip_entry_read() binary safe) [tests/bug7214.phpt]
Bug #72258 ZipArchive converts filenames to unrecoverable form [tests/bug72258.phpt]
Bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize [tests/bug72434.phpt]
Bug #7658 (modify archive with general bit flag 3 set) [tests/bug7658.phpt]
Bug #8009 (cannot add again same entry to an archive) [tests/bug8009.phpt]
Bug #8700 (getFromIndex(0) fails) [tests/bug8700.phpt]
Recognition of compression methods [tests/compression_methods.phpt]
close() called twice [tests/doubleclose.phpt]
ziparchive::addEmptyDir [tests/oo_addemptydir.phpt]
ziparchive::addFile() function [tests/oo_addfile.phpt]
ZipArchive::addGlob() method [tests/oo_addglob.phpt]
ZipArchive::addPattern() method [tests/oo_addpattern.phpt]
zip::close() function [tests/oo_close.phpt]
Delete entries [tests/oo_delete.phpt]
Extending Zip class and array property [tests/oo_ext_zip.phpt]
ZipArchive::ExternalAttributes() function [tests/oo_externalattributes.phpt]
extractTo [tests/oo_extract.phpt]
getComment [tests/oo_getcomment.phpt]
getNameIndex [tests/oo_getnameindex.phpt]
This test will test getStatusString method in ZipArchive [tests/oo_getstatusstring.phpt]
Locate entries by name [tests/oo_namelocate.phpt]
zip::open() function [tests/oo_open.phpt]
ziparchive::properties isset()/empty() checks [tests/oo_properties.phpt]
Rename entries [tests/oo_rename.phpt]
setComment [tests/oo_setcomment.phpt]
setCompressionName and setCompressionIndex methods [tests/oo_setcompression.phpt]
getStream [tests/oo_stream.phpt]
Bug #12414 ( extracting files from damaged archives) [tests/pecl12414.phpt]
stream_get_meta_data() on zip stream [tests/stream_meta_data.phpt]
zip_close() function [tests/zip_close.phpt]
zip_entry_close() function: simple and double call [tests/zip_entry_close.phpt]
zip_entry_compressedsize() function [tests/zip_entry_compressedsize.phpt]
zip_entry_compressionmethod() function [tests/zip_entry_compressionmethod.phpt]
zip_entry_filesize() function [tests/zip_entry_filesize.phpt]
zip_entry_name() function [tests/zip_entry_name.phpt]
zip_entry_open() function [tests/zip_entry_open.phpt]
zip_entry_read() function [tests/zip_entry_read.phpt]
zip_open() function [tests/zip_open.phpt]
zip_open() error conditions [tests/zip_open_error.phpt]
zip_read() function [tests/zip_read.phpt]

sudo make instal

make: * No rule to make target `instal'. Stop.

安装.mk zip安装 php模块安装 php如何安装 安装.zip
分享到
取消 提交回答
全部回答(1)
  • 被纵养的懒猫
    2019-09-27 09:55:35

    zip 是php的一个扩展,用于支持zip文件压缩和解压 按照下面的步骤配置: 1. 用记事本编辑你的 php.ini 文件,搜索 zip.dll 然后把这一行前面的 ; (分号)去掉,保存 php.ini 注意,这一行的上面应该有很多诸如 ;php_***.dll 的,否则搜索的位置不正确,再次搜索 2. 重新启动你的 WEB 服务器。IIS直接在 开始 运行 里面输入 iisreset, Apache 通过管理器先停止再启动即可

    答案来源于网络

    0 1
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

相似问题
最新问题
推荐课程