首頁 >後端開發 >php教程 >解決Zip PHP擴充功能未安裝

解決Zip PHP擴充功能未安裝

WBOY
WBOY原創
2016-07-28 08:29:343668瀏覽

LAMP環境編譯安裝,其中php版本為5.6.8,php-fpm已經做成了系統服務,OS版本為CentOS6.x系列

<code>[RuntimeException]                                                        
  The Zip PHP <span>extension</span><span>is</span><span>not</span> installed. Please install it <span>and</span><span>try</span> again.</code>

安裝php,zip模組

<code>cd /usr/<span>local</span>/src
wget http:<span>//pecl.php.net/get/zip-1.12.4.tgz</span>
tar xvf zip<span>-</span><span>1.12</span><span>.4</span><span>.</span>tgz <span>-C</span> /usr/<span>local</span><span>/</span>
cd /usr/<span>local</span>/zip<span>-</span><span>1.12</span><span>.4</span>
/usr/<span>local</span>/php/bin/phpize
<span>.</span>/configure <span>--</span><span>with</span><span>-php</span><span>-config</span><span>=</span>/usr/<span>local</span>/php/bin/php<span>-config</span>
make <span>&&</span> make install
安装完成后会在/usr/<span>local</span>/php/lib/php/extensions<span>/</span>下生成no<span>-debug</span><span>-non</span><span>-zts</span><span>-xxxxxxxx</span>的目录,其中包含了zip<span>.</span>so
vim /etc/php<span>.</span>ini或者vim /usr/<span>local</span>/php/etc/php<span>.</span>ini
添加一行
extension<span>=</span>/usr/<span>local</span>/php/lib/php/extensions/no<span>-debug</span><span>-non</span><span>-zts</span><span>-</span><span>20131226</span>/zip<span>.</span>so
重新加载或重启fpm
service php<span>-fpm</span> restart</code>

其他zip版本可查看以下連線
http://pecl.php.net/package/zip

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介紹了 解決Zip PHP extension is not installed,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn