Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, DatabasePlugin
Server OS: Red Hat Linux 7.2
Web server: apache-1.3.27-3.7.2
Perl version: perl-5.6.1-36.1.72
Client OS: Winxp Sp1
Web Browser: IE 6.0
Categories: Plugins

-- 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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2004-10-21 - TWikiGuest
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.