在Mac OS X上安装PHP --enable-zip的zip扩展

时间:2009-12-08 21:34:57

标签: php linux macos configuration zip

我想安装以下内容但不确定我应该添加哪个--enable-zip?除了把它放在php.ini中还有更多吗?

http://www.php.net/manual/en/zip.installation.php

1 个答案:

答案 0 :(得分:2)

这种--enable-xyz--with-xyz传递给configure脚本,这是从源代码编译PHP时的第一步(显然是在下载/解压缩源之后)。

有关更多信息,请参阅Installation on Unix System > Apache 2.x on Unix systems;并且,特别是给出configure调用示例的部分:

10. Now, configure your PHP.  This is where you customize your PHP
    with various options, like which extensions will be enabled.  Do a
    ./configure --help for a list of available options.  In our example
    we'll do a simple configure with Apache 2 and MySQL support.  Your
    path to apxs may differ, in fact, the binary may even be named apxs2 on
    your system. 

      ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql

如果您希望/需要使用--enable-zip option重新编译PHP,它将在此命令中正确。