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 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配