PDA

View Full Version : PHP5 Pear DB solution


artemis
09-23-2008, 05:30 PM
I've recently starting using PHP.
Since I wanted to start with PHP5, I got the upgrade.

I want to use my MySQL database, and wrote code using the DB.php PEAR module.
However, after the PHP5 upgrade, DB.php is no longer available.
(It is available for PHP4 users)

I looked on the PEAR site (http://pear.php.net/package/DB) and see that officially, DB is deprecated and superseded by MDB2.

I checked FQ's PEAR directories and do not see DB or MDB2.

Since a PEAR db package is going to be used by many FQ PHP users, what PEAR mysql DB solution is FutureQuest going to support? Can FQ install either DB.php or MDB2.php and the mysql backend drivers in the current standard CGI include path? (/usr/local/lib/php5-pear-5.2.5)

Terra
09-24-2008, 04:32 AM
Adding this module became a depressing series of cause and effect...

While trying to add it in, brought forth a number of deficiencies in how the PEAR repository was being handled... There was no easy way to add it, without the next upgrade clobbering any added modules that wasn't in the stock deployment...

As such, I have been working all day on reorganizing how the core PEAR repository is handled and MDB2 will be added... Unfortunately the reorganization is going to take more time than initially foreseen as it also has to be meshed in with all other servers as well as updating several configurations in a way that the next upgrade won't clobber those either...

Soon I will have PEAR/PECL isolated just as well as the work that has already been accomplished with perl CPAN modules... :)

Terra
09-24-2008, 12:13 PM
Ok - sometimes a bigger hammer really does help and I believe I've gotten PEAR to bend to my will...

I have loaded up a modified PEAR repository on ZOOMER and adjusted the PHP5 include paths in the configuration file...

The new include path will be: '.:/usr/local/lib/php5-pear-fq:/usr/local/lib/php5-pear'

Please give it a test and let me know if it now works properly for you... If so, I will proceed to push it out to all servers...

Please note that right now, only the 'mysql' driver is installed for MDB2 - the 'mysqli' driver won't be available until the next major PHP5 upgrade...

artemis
09-25-2008, 03:18 PM
Ok, finished converting from DB.php to MDB2.php and everything works fine.

Thanks!

MarkW
11-05-2008, 05:12 PM
...

The new include path will be: '.:/usr/local/lib/php5-pear-fq:/usr/local/lib/php5-pear'

Please give it a test and let me know if it now works properly for you... If so, I will proceed to push it out to all servers...

Please note that right now, only the 'mysql' driver is installed for MDB2 - the 'mysqli' driver won't be available until the next major PHP5 upgrade...

Terra/FQ

Has the above been pushed out to all servers, yet?

If so, is it just the 'mysql' driver?

Thanks and regards
Mark