dsq1982 2014-03-28 14:41
浏览 101
已采纳

Memcached安装在MAMP 3.0.3上的PHP 5.3.28上,但不能正常工作

I have a Drupal site running on fresh MAMP PRO 3.0.3 install with the PHP version 5.3.28 on OS X Mavericks 10.9.2.

I installed memcache with pecl install memcache and added the extension=memcache.so line in php.iniunder the extensions section, but still Drupal shows multiple You must enable the PECL memcached or memcache extension to use memcache.inc. errors on top of the page.

phpinfo() on the Drupal root directory tells me that the configuration file loaded is at:

/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini

and the extension dir is:

/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/

$ cat "/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini" | grep memcache extension=memcache.so

$ ls /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/ | grep memcache

-rwxrwxr-x 1 user admin 65K Mar 28 14:00 memcache.so*

What am I doing wrong or is this problem related to MAMP PRO 3? I've installed the memcached binaries with homebrew and the process is running.

I'm also using the Individual PHP versions for every host setting in MAMP.

When starting Apache, there is an error in the logs:

PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so' - dlopen(/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so, 9): Symbol not found: _zend_new_interned_string Referenced from: /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so Expected in: flat namespace in /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so in Unknown on line 0

What does this mean.

Thanks for your help!

  • 写回答

3条回答 默认 最新

  • duanbi7247 2014-03-31 08:24
    关注

    I did not get the memcache extension provided by pecl to work at all. I even installed PHP 5.3.14 but encountered the same problem. Then I cloned the php-memcached-mamp repository from github and used the memcached extension from there and it worked ok.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog