我有一个使用 PECL 构建的 PHP 扩展 ( APC )。我已通过添加以下内容将其添加到配置文件中:
扩展=/usr/lib/php/extensions/no-debug-non-zts-20090626/apc.so
然而 PHP 完全忽略了扩展,没有任何错误或任何东西。为什么会这样?
我的 PHP 配置命令:
'./configure'\'--with-apxs2'\'--enable-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/'\'--enable-mbstring'\'--with-libmemcached-dir=/opt/local'\'--enable-memcached'\"$@"
PS memcached 扩展也发生了同样的事情,所以我将它静态链接到 PHP 中。我不能用 APC 做到这一点,因为当我将它链接到 PHP 时它会导致链接错误,所以我必须将它构建为共享扩展。
PS2:extension_dir 方式也不起作用。