[phpodpworld-users] phpodpworld 2.0 with remote MySQL database
Status: Beta
Brought to you by:
hansfn
From: Howard L. <hl...@gm...> - 2006-04-19 12:15:45
|
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=3D""; 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 "=3D=3D" for the "if" and "elsif" statements. (c) Modify the $dsn for MySQL to become: $dsn =3D "dbi:$db_type:database=3D$db_name;host=3D$db_host"; I'm sending this to the list and hope it will benefit others, or perhaps be considered for the next version. Cheers, Howard |