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 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)