Re: [phpodpworld-users] phpodpworld 2.0 with remote MySQL database
Status: Beta
Brought to you by:
hansfn
From: Hans F. N. <Han...@hi...> - 2006-04-19 13:07:11
|
* Howard Lee <hl...@gm...> [2006-04-19]: > Dear all, > > I have downloaded phpodpworld 2.0 and installed it with a remote MySQL > 5.x database. I have found a problem with the content2db.pl script. > > It is supposed that the config.inc.php and tools/config.pl can specify > the type of database to be Postgresql or MySQL. However, there isn't > an option to specify the database to be remote in tools/config.pl. I > have made some modifications to make this work. > > 1. In the file tools/config.pl, add the following line which can be > used to specify the database hostname. > $db_host=""; > > 2. In the file tools/content2db.pl > (a) locate the line our $db_user; and add: > our $db_host; > (b) There is a problem with the database type detection following the line: > my $dsn; > The string comparison operator "eq" should be used instead of "==" for > the "if" and "elsif" statements. (How embarrassing.) > (c) Modify the $dsn for MySQL to become: > $dsn = "dbi:$db_type:database=$db_name;host=$db_host"; > > I'm sending this to the list and hope it will benefit others, or > perhaps be considered for the next version. Thx for the heads up. The possibility to add host (in general, not only for MySQL) is added - see http://cvs.sourceforge.net/viewcvs.py/phpodpworld/phpodpworld/tools/ (Not updated yet - there is some lag at SourceForge.) The changes you suggest must of course be applied to structure2db.pl too. Regards, Hans PS! There will soon be a new version which is much faster to insert content and structure into the database. PS! Howard, the list is for members only - I forwarded your initial message and am sending you a copy now, but I can't continue like this :-) |