php mysql 扩展

WBOY
WBOYOriginal
2016-06-06 20:34:041320browse

php新手安装mysql环境,我用homebrew安装的,根据这篇文章安装。安装完成以后,无法连接mysql,mysql_connect is not defined这怎么破。我看了写网上的资料,在php.ini文件中加上extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20121212",extension_dir的目录中并没有mysql扩展。要怎么安装mysql扩展呢,系统mac,还有一个很蛋疼的mcrypt也没有。

回复内容:

php新手安装mysql环境,我用homebrew安装的,根据这篇文章安装。安装完成以后,无法连接mysql,mysql_connect is not defined这怎么破。我看了写网上的资料,在php.ini文件中加上extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20121212",extension_dir的目录中并没有mysql扩展。要怎么安装mysql扩展呢,系统mac,还有一个很蛋疼的mcrypt也没有。

homebrew安装那很方便啊。

按照这个文章装 http://brianflove.com/2014/12/10/png-support-for-php-on-os-x-yosemite/ 吧,我装的php56,自带了mysql扩展,根本不用去编译啊。

安装mcrypt扩展使用brew install php56-mcrypt就行了

我就直接安装虚拟机来搞了……

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn