drxt70655 2016-12-14 03:46
浏览 398

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

I case, I tried to install APC. I run configure file it's running normally, but when I try to make I get the following errors :

/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"

Check if APC installed

/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 ?

  • 写回答

1条回答 默认 最新

  • dongwen9051 2016-12-14 04:16
    关注

    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. And the APC extension had not been updated since then. The extension seems abandoned, as the last commit was in September 12, 2013.

    So you should whether use another caching extension, or upgrade the APC extension internals. I would rather use OPcache which is bundled with PHP since version 5.5.0.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度