MDB2 package Problem finding 'MDB2_Driver_mysql

Issues related to software problems.
Post Reply
gosteen
Posts: 7
Joined: 2011/09/15 23:06:43
Location: Aiken, South Carolina

MDB2 package Problem finding 'MDB2_Driver_mysql

Post by gosteen » 2011/09/19 13:12:03

I'm trying to get started with LAMP development and am having some issues.
Here is some general info on my system

[quote]
[root@localhost ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo

[root@localhost ~]# rpm -q centos-release
centos-release-5-7.el5.centos

[root@localhost ~]# uname -rmi
2.6.18-274.3.1.el5 i686 i386

[root@localhost LAMP]# rpm -qa | grep php
php53-gd-5.3.3-1.el5_6.1
php53-devel-5.3.3-1.el5_6.1
php53-cli-5.3.3-1.el5_6.1
php53-pgsql-5.3.3-1.el5_6.1
php-pear-Date-1.4.7-2.el5.centos
php53-pdo-5.3.3-1.el5_6.1
php53-xml-5.3.3-1.el5_6.1
php53-xmlrpc-5.3.3-1.el5_6.1
php-pear-MDB2-2.4.1-2.el5.centos
php53-soap-5.3.3-1.el5_6.1
php53-mbstring-5.3.3-1.el5_6.1
php53-common-5.3.3-1.el5_6.1
php53-pspell-5.3.3-1.el5_6.1
php53-5.3.3-1.el5_6.1
php53-mysql-5.3.3-1.el5_6.1
php-pear-1.4.9-6.el5
[/quote]

Here is simple php file I am running
[quote]
getMessage().' - '.$mdb2->getUserinfo());
}

$query ='SELECT * FROM test';

// run the query and get a result handler
$result = $mdb2->query($query);

// check if the query was executed properly
if (PEAR::isError($result)) {
echo ($result->getMessage().' - '.$result->getUserinfo());
exit();
}

// lets just get row:0 and free the result
$array = $result->fetchRow();
$result->free();
var_dump($array);
?>
[/quote]


When I run this I get the following error
[quote]
MDB2 Error: not found - unable to find package 'MDB2_Driver_mysql' file 'MDB2/Driver/mysql.php'
[/quote]

I looked up MDB2_Driver_mysql and the source I found said this should be in the CentOS Extras Repositories and that they came
standard with CentOS 5.6, but I don't see that repository. How Do I get it?

Also I noticed that most of the packages I have installed are php53 but my pear, MDB2 and Date are just php. I've seen a lot of references on this site to using php53u instead of php53. Since I'm new to both PHP and CentOS I'm just looking for some guidance.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

MDB2 package Problem finding 'MDB2_Driver_mysql

Post by pschaff » 2011/09/23 22:04:05

The package php-pear-MDB2-Driver-mysql-1.4.1-3.el5.centos from [extras] provides MDB2_Driver_mysql. Not sure why that would not have been a dependency for what you have installed - may be a bug.

As far as php53u - that is from IUS repo, which many people like, but they do not have corresponding MDB2 packages. I do see later versions from [url=http://wiki.centos.org/AdditionalResources/Repositories?highlight=%28Remi%29]Remi repo[/url] (also widely used) but you would need to remove all current php53 and mysql packages to use his. Of course the same goes for IUS or other repos that provide replacements for core packages. Both sources seem to provide more complete solutions than the [extras] php53 packages. I can't advise from personal experience.

Post Reply