PHPExcel 错误Fatal error: ZipArchive library is not enabled
来源:互联网 发布:python最突出的优点 编辑:程序博客网 时间:2024/05/29 09:17
出现这个错误说明是程序在调用'ZipArchive' 这个类的时候没有成功,原因是由于在安装php的时候没有增加php zip的支持(非zlib)。
在Windows下的解决办法是:
1、在php.ini文件中,将extension=php_zip.dll前面的分号“;”去除;
(如果没有,请添加extension=php_zip.dll此行并确保php_zip.dll文件存在相应的目录)
然后同样在php.ini文件中,将 zlib.output_compression = Off 改为 zlib.output_compression = On ;
2、重启Apache服务器。
在Unix/Linux下的解决办法:
1、在Linux下没有php_zip.dll这个文件(有也不会起作用的),所以需要重新编译一下php的zip模块。具体安装方法如下:
cd /usr/src
wget
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 ;
3、最后别忘了重启一下Apache:apachectl restart;
这个针对php的zip模块就安装完成了,能够在php中使用ZipArchive类了。
- PHPExcel 错误Fatal error: ZipArchive library is not enabled
- 解决PHP报错ZipArchive library is not enabled异常的方法
- Fatal error: Class ‘ZipArchive’ not found
- Fatal error: Class 'ZipArchive' not found的解决办法
- Fatal error: Class 'ZipArchive' not found的解决办法
- Fatal error: Class 'ZipArchive' not found的解决办法
- Fatal error: Class 'ZipArchive' not found的解决办法
- JMX enabled by default Error contacting service. It is probably not running错误解决
- 安装PHPExcel后运行测试页面报”Class 'ZipArchive' not found“错误的解决方法
- PHP Fatal error: Uncaught Error: Class 'ZipArchive' not found in /nginx/html/vendor/phpoffice/phpex
- osx 10.9.4 遇到PHP Fatal error: Class ‘ZipArchive’ not found的解决方法
- php 导入excel解析提示 Fatal error: Class 'ZipArchive' not found解决方法
- Error: Debugging Failed Because Integrated Windows Authentication Is Not Enabled
- if there is a error "SSSE3 instruction set not enabled"
- Aggregation is not enabled.
- Android--Error:Library projects cannot enable Jack. Jack is enabled in default config
- 启动tomcat是出现错误( Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.)
- Slackware下,XeLaTeX错误: restricted \write18 enabled.(Fatal format file error; I'm stymied)
- FCKEditor部分配置说明
- 嵌入式体验入门班----必修实验一:SD卡BIOS
- 所谓PHP分页也就这么回事
- 如何给按钮加上链接功能
- 7788
- PHPExcel 错误Fatal error: ZipArchive library is not enabled
- 加密内存卡 TF 卡歌曲或资料拷贝出来的方法,完全可行!
- Tranches
- Android 存储设备管理 -- Vold
- 访问者模式
- linux命令学习(五)vi
- Jquery学习---选择器与事件
- Android工具HierarchyViewer 代码导读
- error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such fi