Home >Database >Mysql Tutorial >php扩展之 pdo_mysql.so_MySQL

php扩展之 pdo_mysql.so_MySQL

WBOY
WBOYOriginal
2016-05-31 08:50:121456browse

总结:新搭编译安装的 nginx+php+mysql环境,运行之前开发的项目遇到了没有安装pdo的问题

1.进入到php5的源码包里面,ext下面,找到pdo_mysql文件夹

首先执行:/usr/loca/php5/bin/phpize

2.进行编译。
./configure --with-php-config=/usr/local/php5/bin/php-config --with-pdo-mysql=/usr/local/mysql 


--with-php-config=/路径是你已经安装的php的路径下面的bin/php-config

 --with-pdo-mysql=你的mysql目录

3.编译安装。
make && make install


4./usr/local/php/lib/php/extensions/no-debug-non-zts-20050922 的路径下面有一个pdo_mysql.so就ok,

到php.ini中添加extension=pdo_mysql.so

重新启动php-fpm

5.看一下phpinfo();是否有mysql_pdo.so



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