【发布时间】:2011-05-20 09:54:36
【问题描述】:
我有一个使用 PECL 构建的 PHP 扩展 (APC)。我已通过添加以下内容将其添加到配置文件中:
extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/apc.so
然而 PHP 完全忽略了扩展,没有任何错误或任何东西。 为什么会这样?
我的 PHP 配置命令:
'./configure'\'--with-apxs2'\ '--启用-gd-native-ttf' \ '--with-curl' \ '--with-gd' \ '--with-freetype-dir=/opt/X11/' \ '--with-jpeg-dir=/opt/local/' \ '--with-png-dir=/opt/local/' \ '--with-mysql=/usr/local/mysql' \ '--without-iconv' \ '--with-mm' \ '--with-mysqli=/usr/local/mysql/bin/mysql_config' \ '--with-imagick=/opt/local/' \ '--启用mbstring' \ '--with-libmemcached-dir=/opt/local' \ '--enable-memcached' \ "$@"
附: memcached 扩展也发生了同样的事情,所以我将它静态链接到 PHP。我不能用 APC 做到这一点,因为当我将它链接到 PHP 时它会导致链接错误,所以我必须将它构建为共享扩展。
P.S.2:extension_dir 方式也不起作用。
【问题讨论】: