解决方法:

1.安裝yum的plugin: yum-priorities  


#yum install yum-priorities


2.編輯priorities.conf


#vi /etc/yum/pluginconf.d/priorities.conf

將以下內容

enabled = 1

修改成

enable = 1

check_obsoletes=1

priority=N

:wq


3.設定EPEL


#rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm


4.安裝zipArchive


#yum install php-pecl-zip


5.重新啟動httpd


#service httpd restart

=====================================================
如果是自己编译的话,那么第三步开始:
在Linux下没有php_zip.dll这个文件(有也不会起作用的),所以需要重新编译一下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 install命令的时候,可能需要用到root的权限,所以建议使用sudo来运行。安装完之后,屏幕上会提示zip.so的位置。然后将其记录下来,如:/usr/local/lib/php/extensions/zip.so。

2、使用root权限修改php.ini(通常可能会在/usr/local/lib/文件夹下,不过视当初安装php而定,可以通过phpinfo()来查看):

增加extension = /usr/local/lib/php/extensions/zip.so,然后同样在php.ini文件中,将 zlib.output_compression = Off 改为 zlib.output_compression = On ;

默认分类 | 评论(0) | 引用(0) | 阅读(363)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写