dth34653 2017-10-17 18:10
浏览 673

如何在Mac OSX上安装php 5.6 mysql扩展

I am trying to setup PHP 5.6 and one of the older sites that I work with needs the mysql extension which didn't install when I ran:

brew install php56 --with-fpm --with-mysql --with-httpd

It installed php56 and that's all working fine however it installed the mysqli extension but I need the mysql extension too.

Is there a way to install this extension to my current php setup?

Here is the currently installed php extensions that I have:

5.6 php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mongodb
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]
Xdebug

Just wondering, thanks!

  • 写回答

2条回答 默认 最新

  • doushansu9012 2017-10-17 18:13
    关注

    Try the following:

    brew reinstall php56 --with-fpm --with-libmysql --with-httpd
    

    Per the homebrew installer options, this installs the old mysql driver instead of the newer native driver. I don't think there is any way to install both simultaneously as the drivers conflict.

    If this is a new project you are working on, it may be worth the time to refactor your project to use the native driver.

    评论

报告相同问题?

悬赏问题

  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码