问题描述
我正在尝试安装PHP Zip扩展。
我的服务器没有外部网络连接,所以我自己从PECL下载:。我选择了1.10.2,最新的稳定版本,并将其传输到我的服务器。
我跑了:
pear install zip-1.10.2.tgz
并添加
extension = zip.so
到php.ini。我可以看到zip.so被创建,并放置在正确的extension_dir文件夹中。我重新启动了apache,然后检查它是否通过运行加载:
php -m
尽管如此,zip仍然不在该列表中。
我缺少一个步骤或做错了什么?
其他可能很重要的东西:
CentOS
Apache 2.2.3
PHP 5.2.16解决方案几个
php.ini
文件,一个用于CLI,一个用于apache。运行php --ini
,查看CLI ini位置在哪里。I'm attempting to install the PHP Zip extension.
My server does not have external internet access, so I downloaded it myself from PECL: http://pecl.php.net/package/zip. I chose 1.10.2, the latest "stable" release, and transferred it to my server.
I ran:
pear install zip-1.10.2.tgz
and added
extension=zip.so
to php.ini as instructed. I can see that zip.so was created and placed in the right extension_dir folder as well. I restarted apache and then checked to see if it was loaded by running:
php -m
Despite all of this, "zip" is still not in that list.
Am I missing a step or doing something wrong? I thought this should be really simple, and I'm starting to feel pretty dumb, haha.
Other probably important stuff:
CentOSApache 2.2.3PHP 5.2.16
解决方案You may have several
php.ini
files, one for CLI and one for apache. Runphp --ini
to see where the CLI ini location is.这篇关于安装PHP Zip扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!