pecl pdo mysql,使用PECL OS在PHP 5.1.6上安装PDO_MYSQL:Ubuntu

I'm having real problems getting PDO_MYSQL working.

I started by just trying to install the PDO_MYSQL driver via PECL, however when this didn't work I looked round to see if there where any issues reported. It seems that there may be a conflict between the embedded version of PDO and PDO_MYSQL. To that end i decided to reinstall all it's dependencies from PECL.

Environment:

OS: Ubuntu

PHP Ver: 5.1.6 (Unable to upgrade due to clients live environment)

Procedure Followed:

PECL uninstall PDO_MYSQL

PECL uninstall PDO

PECL uninstall mysql

PECL install mysql

PECL install PDO

PECL install PDO_MYSQL

Lines Added to PHP.ini

extension=mysql.so

extension=pdo.so

extension=pdo_mysql.so

apachectl restart

[warn] php5_module is already loaded, skipping

I then check PHPINFO to see which modules are installed. I see:

PDO drivers sqlite2

That's it!

If any one could suggest any solutions to this I'd be deeply grateful. I need MYSQL PDO driver to run zend framework for an upcoming project... and yes I have to use v1.6 due to the PHP version.

解决方案

If you're on ubuntu, try apt-get :

sudo apt-get install php5-mysql

which should make

/usr/lib/php5/20060613+lfs/pdo.so

and PDO will be available after an apache restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值