doupu1727 2015-06-24 22:25
浏览 183

brew之后安装php56无法找到php扩展

I just did a brew install of php56. Then wanted to enable some extensions like php_pdo_mysql and php_mysqli, so I went to my php.ini file and uncommented the relevant lines, for example: extension=php_mysqli.so But for some reason which I try to start php I get the error: Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php56/5.6.10/lib/php/extensions/no-debug-non-zts-20131226/php_pdo_mysql.so'

I don't have such a directory on my system. I tried to find the correct location of my php extensions, but couldn't find it. I believe I must have them since typing php -m gives a list of all the zend modules I need. I do seem to have a folder /usr/lib/php/extensions/no-debug-non-zts-20121212 which only has 3 extensions in it, but when I tried to replace the extension directory section of my php-config file with this file, calling phpinfo() still listed the old missing directory. Any help in figuring out how to have php access these missing extensions would be appreciated!

  • 写回答

1条回答 默认 最新

  • dqybjj3497 2016-04-02 04:41
    关注

    If I've well understood this Github issue, you should remove opcache reference from your php.ini (you will were it is located by doing php -i | grep ini, and it's probably in /usr/local/etc/php/5.6/php.ini). I commented these two lines :

    zend_extension=opcache.so
    opcache.enable=0
    

    And to retrieve opcache, brew rm php56 && brew install php56 --enable-opcache should do the job ! (though I'm not sure

    评论

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题