Question
I have installed the database plugin for TWiki and I am seeing this information in my httpd error_log. What have I done Wrong?
view: DBD::mysql::st execute failed: Unknown column 'db_sid' in 'field list' at ../lib/TWiki/Plugins/DatabasePlugin.pm line 167.
[Wed Oct 20 15:46:56 2004] view: DBD::mysql::st fetchrow_array failed: fetch() without execute() at ../lib/TWiki/Plugins/DatabasePlugin.pm line 169.
Here is the database I created to pull the description from:
mysql> select * from Database_Plugin;
+------+--------------+--------+---------+--------------+-------------+-------------+-----------+
| ID | description | driver | db_name | table_name | ro_username | ro_password | hostname |
+------+--------------+--------+---------+--------------+-------------+-------------+-----------+
| 1 | iplist_table | mysql | hello | ip_table | jack | jack | localhost |
| 2 | subnet_table | mysql | hello | subnet_table | jack | jack | localhost |
+------+--------------+--------+---------+--------------+-------------+-------------+-----------+
Here is the DatabasePluginConfig.pm
more DatabasePluginConfig.pm
# Information in this file is intended for use by the DatabasePlugin. It
# is assumed that the location of this file is such that it is NOT
# accessible from a browser or is in a location that can't be viewed from a
# browser. This is done since it contains secure database access
# information.
package DatabasePluginConfig;
#$ENV{ORACLE_HOME} = "/usr/local/oracle/product/8.1.7";
# Define the default information used by the DatabasePlugin specifying
# where to go to get the real information used by the DatabasePlugin.
$db_driver = "mysql";
$db_database = "hello";
$db_sid = "";
$db_username = "jack";
$db_password = "jack";
$db_table = "Database_Plugin";
$db_hostname = "";
$db_edit_prefix = "https";
$db_edit_url = "phpMyAdmin-2.2.2-rc1";
# Master database information if $db_driver = 'local'
# The fields are:
# description = This field acts as the look-up mechanism for the
# indirection. A TWiki page would reference this
# name instead of having to publicly specify user
# names, passwords, etc.
# db_driver = values like: mysql, Oracle, etc.
# db_name = DB name
# db_sid = SID of database
# db_table = table user data is located in
# db_username = username to access table
# db_password = password to access table
# db_hostname = host on which the DB lives
@dbinfo = (
[
"subnet_list", # description
"mysql", # DB driver
"hello", # DB name
"mySID", # DB sid
"subnet_table", # DB table
"jack", # DB username
"jack", # DB password
"localhost" # DB host
]
);
1;
Environment
--
TWikiGuest - 20 Oct 2004
Answer
Just add a column called
db_sid to
Database_Plugin and fill it with dummy values.
db_sid values are used by the Oracle driver - it is not used with MySQL. But the column should still exist in the table.
--
SteffenPoulsen - 21 Oct 2004
Thanks that was my problem...
--
TWikiGuest - 21 Oct 2004