tags:

views:

922

answers:

4

I've been using pear packages in php for years. I'm in the process of upgrading/moving a sites that uses the MDB2 pear package and it has not been updated for PHP 5.3.X.

In 5.3, MDB2 is returning those new annoying errors.

Unknown: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/MDB2.php on line 390

I know I can change my error reporting settings to get rid of them, but I'd rather not make any exceptions. Anyway, Is anyone else using MDB2 these days and have a solution? Are there similar database packages you recommend?

Thanks. -Matt

+1  A: 

You can use Zend Framework database support or use an ORM like Doctrine or Propel

Keeper
+3  A: 

I would definitly go for an ORM, at least if you are working on a big project, for which you don't want to use mysqli_* or PDO functions/methods directly -- Doctrine being the most developped/used, nowadays (It's the default ORM of the symfony Framework, and can be integrated in Zend Framework quite easily).

About the E_DEPRECATED errors, though : PHP 5.3 is quite young, and lots of libraries/software/projects have not been adapted yet -- you'll probably have lots of those in the next couple of months :-(

Pascal MARTIN
Yeah I agree about the immaturity of PHP 5.3, and I understand that it's going to take some time for us all to update our code, but I don't think MDB2 will ever be updated (looks abandoned to me).Doctrine look great. Thanks.
mattweg
You're welcome :-) Have fun with it !
Pascal MARTIN
+1  A: 

I'm going to comment on this, since it's coming up high on Google search results for the problem.

I contacted the lead developer for MDB2, who said:

please check out a copy of MDB2 from SVN, it's fully PHP5.3 compatible, with many performance improvements. I'm currently waiting for some fixes to the new SQL Server driver (Microsoft is working on it this very week), then I'll push a new stable release.

Aquarion
A: 

Where is the MDB2 SVN Repository located?

There you go: http://svn.php.net/repository/pear/packages/MDB2/
yclian