`
igogo007
  • 浏览: 154609 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

linux环境下配置PHP的mysql,mysqli,pdo扩展

阅读更多
一、安装mysql扩展
cd php-5.6.14
cd ext/
cd mysql/
/usr/local/php/bin/phpize 
./configure --with-php-config=/usr/local/php/bin/php-config --with-mysql=mysqlnd --with-zlib-dir=/usr/local/zlib
make
make install



提示如下:
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/


二、安装mysqli扩展
cd php-5.6.14
cd ext/
cd mysqli/
/usr/local/php/bin/phpize 
./configure --with-php-config=/usr/local/php/bin/php-config --with-mysql=mysqlnd
make
make install

提示如下:
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files:          /usr/local/php/include/php/



三、安装pdo扩展
cd php-5.6.14
cd ext/
cd pdo/
/usr/local/php/bin/phpize 
./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=mysqlnd
make
make install


提示如下:
Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
Installing header files:          /usr/local/php/include/php/
Installing PDO headers:          /usr/local/php/include/php/ext/pdo/



最后配置php.ini即可
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics