PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #5036

Generator error with database_XXX in .ini file

Details

Submitted2005-08-09 10:24 UTC
Fromlaurens dot van dot alphen at keenondots dot com
Assignedalan_k
StatusClosed
PackageDB_DataObject
PHP Version5.0.5
OSSuSE 9.x
Roadmaps(Not assigned)

Comments

[2005-08-09 10:24 UTC] laurens dot van dot alphen at keenondots dot com

Description:
------------
When calling the Generator from the command line, it complains it cannot find class DB in line 112:

$dsn = DB::parseDSN($database);

I added this above to fix:

require_once 'DB.php';

Cause: I have database_erp = mysql://... in my .ini file instead of just database = mysql://...

Test script:
---------------
php /path/to/DB/DataObject/createTables.php ../DataObjects.ini

where DataObjects.inin contains:

[DB_DataObject]
database_erp = mysql://...

Expected result:
----------------
DONE

Actual result:
--------------
PHP Fatal error: Class 'DB' not found in /usr/local/lib/php/DB/DataObject/Generator.php on line 112

Fatal error: Class 'DB' not found in /usr/local/lib/php/DB/DataObject/Generator.php on line 112