简体   繁体   English

警告:PHP启动:无法加载动态库apc.so

[英]Warning: PHP Startup: Unable to load dynamic library apc.so

I case, I tried to install APC . 我的情况下,我尝试安装APC I run configure file it's running normally, but when I try to make I get the following errors : 我运行configure文件,它运行正常,但是当我尝试make之时,出现以下错误:

/home/ghost/APC-3.1.13/apc_cache.c: In function ‘_apc_cache_user_update’:
/home/ghost/APC-3.1.13/apc_cache.c:818:63: error: ‘IS_CONSTANT_INDEX’ undeclared (first use in this function)
         switch(Z_TYPE_P((*slot)->value->data.user.val) & ~IS_CONSTANT_INDEX
                                                           ^
/home/ghost/APC-3.1.13/apc_cache.c:818:63: note: each undeclared identifier is reported only once for each function it appears in
/home/ghost/APC-3.1.13/apc_cache.c:820:22: error: ‘IS_CONSTANT_ARRAY’ undeclared (first use in this function)
             case IS_CONSTANT_ARRAY:
                  ^
Makefile:186: recipe for target 'apc_cache.lo' failed
make: *** [apc_cache.lo] Error 1

After that 之后

I run this command sh -c "echo 'extension=apc.so' >> /opt/lampp/etc/php.ini" 我运行以下命令sh -c "echo 'extension=apc.so' >> /opt/lampp/etc/php.ini"

Check if APC installed 检查是否安装了APC

/opt/lampp/bin/php -r 'echo phpinfo()' | grep apc --color

Output : 输出:

Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/apc.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0

How do I fix it ? 我如何解决它 ?

You are trying to compile the extension with a PHP version where IS_CONSTANT_INDEX and IS_CONSTANT_ARRAY C constants are no longer available . 您正在尝试使用PHP版本编译扩展,其中IS_CONSTANT_INDEXIS_CONSTANT_ARRAY C常量不再可用 And the APC extension had not been updated since then. 从那时起,APC扩展名尚未更新 The extension seems abandoned, as the last commit was in September 12, 2013 . 该扩展似乎已被放弃,因为最后一次提交是在20139月12日

So you should whether use another caching extension, or upgrade the APC extension internals. 因此,您应该使用其他缓存扩展,还是升级APC扩展内部。 I would rather use OPcache which is bundled with PHP since version 5.5.0. 我宁愿使用自版本5.5.0起与PHP捆绑在一起的OPcache

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 随着PHP启动,Yii2中出现错误:无法加载动态库apc.so - Getting Error in Yii2 as PHP Startup: Unable to load dynamic library apc.so 警告:PHP 启动:无法加载动态库 - Warning: PHP Startup: Unable to load dynamic library PHP APC加载apc.so时出错 - PHP APC Error Loading apc.so PHP警告:PHP启动:无法加载动态库'/usr/lib/php/20151012/gd.so' - PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/gd.so' PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/20151012/msqli.so' - PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/msqli.so' PHP 警告:PHP 启动:无法加载动态库 'sqlsrv.so' - PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv.so' PHP 警告 - PHP 启动:无法加载动态库“imagick.so” - PHP Warning - PHP Startup: Unable to load dynamic library 'imagick.so' PHP 警告:PHP 启动:无法加载动态库“session.so” - PHP Warning: PHP Startup: Unable to load dynamic library 'session.so' `PHP 警告:PHP 启动:无法加载动态库 'mcrypt.so' - `PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' PHP 警告:PHP 启动:无法加载动态库“pdo_mysql.so” - PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM