PHPExcel Fatal error: ZipArchive library is not enabled
导致上述问题的可能性有两种:
1、没开启php_zip.dll扩展
a、在Windows下的解决办法是:
(a1) 在php.ini文件中,将extension=php_zip.dll前面的分号“;”去除;
(如果没有,请添加extension=php_zip.dll此行并确保php_zip.dll文件存在相应的目录)
然后同样在php.ini文件中,将 zlib.output_compression = Off 改为 zlib.output_compression = On ;
(a2) 重启Apache服务器。
b、在Unix/Linux下的解决办法:
(b1) 在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。
(b2) 使用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 ;
(b3) 最后别忘了重启一下Apache
2、你所用的PHP版本不支持
The php_zip extension on Windows coming with PHP 5.2.6 and PHP 5.2.8 contains an error when creating ZIP files. See http://bugs.php.net/48763 for details. The version that can be found on http://snaps.php.net/win32/php5.2-win32-latest.zip should work at all times.
其原文的地址:http://phpexcel.codeplex.com/wikipage?title=FAQ
这是在PHPExcel官网中copy下来的原文,意思是PHP 5.2.6 and PHP 5.2.8中无法解决这个问题,你只能升级PHP的版本了。
如果你遇到的是这种情况,我只能说恭喜你
PHPExcel Fatal error: ZipArchive library is not enabled的更多相关文章
- Fatal error: Class 'ZipArchive' not found的解决办法
今天在Linux底下编写导出EXCEL文件并显示输出时,抛出“ZipArchive library is not enabled” 的异常.而我在本地的windows下的代码则是运行正常的. 原因是: ...
- fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/apple/Library/Developer
在同一时候安装使用Xcode5, Xcode6之后, 常常遇到这个问题. fatal error: malformed or corrupted AST file: 'Unable to load m ...
- kafka启动时出现FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) java.io.IOException: Permission denied错误解决办法(图文详解)
首先,说明,我kafk的server.properties是 kafka的server.properties配置文件参考示范(图文详解)(多种方式) 问题详情 然后,我启动时,出现如下 [hadoop ...
- 无法启动"D\projects\hello\Debug\hello.exe" 系统找不到指定的文件。[LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏]
这两天安装Visual Studio遇到这样的一个问题,用自己的电脑和公司的电脑都出现同样的问题.两台电脑都是新系统,按理来说是没有问题的.但是一出现问题,对于我这个小白来说,还是耗费了挺多精力都无果 ...
- Fatal error: Call to undefined function imagettftext()解决办法
Fatal error: Call to undefined function imagettftext()解决办法 我的问题是php编译安装时指定了gd的目录,其实不用指定.就可以了 博客分类: ...
- VC连接mysql数据库错误:libmysql.lib : fatal error LNK1113: invalid machine 解决方法
VC连接MySQL的配置过程在上一篇博文中,不过当你设置好,以为万事大吉的时候,运行却出现这个错误:libmysql.lib : fatal error LNK1113: invalid machin ...
- fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Dev
类似这样的错误: fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.pla ...
- dxut.h(29): fatal error C1083: Cannot open include file: 'dxsdkver.h': No such file or directory
从网上download一个三维演示模型的软件编译发现报找不到dxsdkver.h文件,网上查阅这是MS的DirectX sdk中的库文件,于是先download DirectX SDK 安装之后,配置 ...
- iOS 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
使用不同版本的XCode出现的问题: fatal error: malformed or corrupted AST file: 'Unable to load module "/Users ...
随机推荐
- Oracle EBS-SQL (PO-16):检查采购订单完成情况统计.sql
select e.FULL_NAME 采购员, sum(plla ...
- Excel导入到DataTable
1.前台代码 <asp:FileUpload ID="fupFiles" runat="server" /> <asp:Button ID=& ...
- delphi 把多个线程的请求阻塞到另一个线程 TElegantThread
本例是把多个线程访问数据库的请求,全部阻塞到一个线程. 这是实际编程中常见的一种问题. 示例源码下载,所需支持单元均在源码中,且附详细说明. TElegantThread 的父类是 TSimpleTh ...
- cf459D Pashmak and Parmida's problem
D. Pashmak and Parmida's problem time limit per test 3 seconds memory limit per test 256 megabytes i ...
- Unity doesn't load, no Launcher, no Dash appears
1. 重新安装 ubuntu-desktop不起作用. Enter the following commands:- Ctrl+Alt+F1 login there by user name and ...
- -DDEBUG编译标记
想必大家都有利用输出函数如printf来帮助我们调试程序的经历,这是一种比较原始的程序调试辅助方法,在Linux下也可以为我们所用.不过这种方法有一个明显的缺点,就是在调试完后我们必须注释或删除掉这些 ...
- css3文本效果
CSS3 包含多个新的文本特性. 在本章中,您将学到如下文本属性: 1. text-shadow 2. word-wrap 浏览器支持 Internet Explorer 10.Firefox.Chr ...
- android欢迎页源码
直接上源码: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import ...
- QT-Creator C/C++ 打地鼠小游戏
废话少说先上图: 这个游戏纯属土鳖思路,没有用到什么游戏引擎. 1.使用按钮或QLabel铺满窗口. 2.通过简单算法随机动态的设置按钮矩阵中某个按钮的背景图像. 3.同步2过程反复设置多个按钮背景实 ...
- VS 调试Window Server方法
在需要调试的地方加 Debugger.Launch();然后在本机安装服务并启动即可进入