<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>运达&#039;s  blog &#187; zip</title>
	<atom:link href="https://www.yunda51.com/?feed=rss2&#038;tag=zip" rel="self" type="application/rss+xml" />
	<link>https://www.yunda51.com</link>
	<description>运达的博客</description>
	<lastBuildDate>Wed, 12 Nov 2025 07:58:26 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.19</generator>
	<item>
		<title>Linux下添加php的zip模块</title>
		<link>https://www.yunda51.com/?p=1739</link>
		<comments>https://www.yunda51.com/?p=1739#comments</comments>
		<pubDate>Tue, 15 Nov 2016 10:02:19 +0000</pubDate>
		<dc:creator><![CDATA[运达]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zip]]></category>
		<category><![CDATA[zip.so]]></category>

		<guid isPermaLink="false">http://www.yunda51.com/?p=1739</guid>
		<description><![CDATA[今天开发做导入excl功能的时候，发现导入的时候一直报错： include(ZipArchive.php): <a href="https://www.yunda51.com/?p=1739" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>今天开发做导入excl功能的时候，发现导入的时候一直报错：</p>
<pre class="wp-code-highlight prettyprint">
include(ZipArchive.php): failed to open stream: No such file or directory。
</pre>
<p>报错如下图：<br />
<a href="http://www.yunda51.com/wp-content/uploads/2016/11/20161115175040.png" target="_blank"><img src="http://www.yunda51.com/wp-content/uploads/2016/11/20161115175040.png" alt="20161115175040" width="1602" height="112" class="alignnone size-full wp-image-1740" /></a><br />
说是没有zip这个模块，于是在网上找了些资料看了看，果真是没有这个模块，于是乎就下载这个包，安装，结果报错了，起初下的zip包的版本是1.10.2，报错之后觉得不以劲，于是就下了1.12.3版本，结果成功了。</p>
<p>之前1.8.10报的错误是： </p>
<pre class="wp-code-highlight prettyprint">
make: *** [php_zip.lo] Error 1
ERROR: `make&#039; failed
</pre>
<p>于是就换了版本再试，下了1.12.3版本：<br />
安装步骤如下：</p>
<pre class="wp-code-highlight prettyprint">
wget http://pecl.php.net/get/zip-1.12.4.tgz
tar zxvf zip-1.12.4.tgz
cd zip-1.12.3
/app/soft/php5.6.16/bin/phpize
./configure --with-php-config=/app/soft/php5.6.16/bin/php-config
make &amp;&amp; make install
</pre>
<p>安装之后查看下zip.so<br />
执行：cd /app/soft/php5.6.16/lib/php/extensions/no-debug-non-zts-20131226/<br />
如图：<a href="http://www.yunda51.com/wp-content/uploads/2016/11/20161115175816.png" target="_blank"><img src="http://www.yunda51.com/wp-content/uploads/2016/11/20161115175816.png" alt="20161115175816" width="1078" height="98" class="alignnone size-full wp-image-1741" /></a><br />
然后修改一下php.ini的配置文件，加上以下的扩展：<br />
extension=zip.so<br />
最后重载php-fpm就可以了 或者 pkill php<br />
到此已经完成，你可以尽情的去开发了，哈哈~~</p>
<p>zip的各种版本可以到以下网站去下载：</p>
<p>http://pecl.php.net/package/zip</p>
]]></content:encoded>
			<wfw:commentRss>https://www.yunda51.com/?feed=rss2&#038;p=1739</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
