Banshee
the secure PHP framework

Forum

setup_database: Error message: Table 'mysql.settin

Andre
5 april 2011, 14:23


Banshee version: 3.1
PHP version: 5.3.3
Webserver: hiawatha 7.4

This script will create a MySQL user 'banshee' and the database 'develop'.

Make sure the database settings in settings/website.conf are correct!

Enter MySQL root password:
SQL query: select * from settings where `key`='secret_website_code'
Error message: Table 'mysql.settings' doesn't exist
SQL query: insert into settings (`key`, `type`, `value`) values ('secret_website_code', 'string', '35b88fb2f54fc6ae8cbc1f9f62692b52')
Error message: Table 'mysql.settings' doesn't exist


It appears that it is querying the mysql database instead of the banshee created one?

Andre
5 april 2011, 14:25
also... mysql 5.5.10
Hugo Leisink
5 april 2011, 14:45
In the setup_database script, place the following lines above the last two lines in that script, above the "$settings = new settings($db);".
    $db = new MySQLi_connection(DB_HOSTNAME, DB_DATABASE, DB_USERNAME, DB_PASSWORD);
if ($db->connected == false) {
exit("Can't connect to MySQL database (".DB_USERNAME."@".DB_DATABASE.").\n");
}

Thanks for reporting it and sorry for this sloppy bug.
Andre
5 april 2011, 14:49
No problem. Thanks for hiawatha. Great webserver.
Andre
5 april 2011, 15:21
Received a warning notice:

PHP Notice: Undefined index: type in hiawatha/banshee/libraries/settings.php on line 77
Hugo Leisink
5 april 2011, 16:03
The $setting["type"] in that line should be $setting[0]["type"]. Good bug hunting!
René
5 april 2011, 17:17
Banshee version: 3.1
PHP version: 5.3.6
Webserver: hiawatha 7.4_1

Strange, man.

I've just setup a jail with Hiawatha 7_4_1 and Banshee 3.1 without any problems! I installed the database
with the command "php setup_database".

Cheers
Andre
5 april 2011, 17:22
ran clean. Thanks.
Andre
5 april 2011, 17:26
Rene: are you running php with suhosin patch?
René
5 april 2011, 17:27
PHP 5.3.6 with Suhosin-Patch (cli) (built: Apr 5 2011 15:33:04)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
Andre
5 april 2011, 17:34
very strange
René
5 april 2011, 17:44
Yep, we all get strange somehow.
Hugo Leisink
5 april 2011, 18:27
It's not strange, I updated the 3.1 package. Since the bug was in a setup script, I thought it was too important to wait for the next release.
René
5 april 2011, 20:04
I didn't know the 3.1 package was updated, so i thought 'That's strange'. Anyway i had zero problems installing Hiawatha and Banshee. Thanks.
Hugo Leisink
5 april 2011, 20:23
I know that updating a released package is not the correct way to fix bugs. But since Banshee has not many users, I don't think it causes problems.
Message preview

The following BB-codes are available in a message:

  • [b]Bold text[/b]
  • [center]Center text or imagen[/center]
  • [color=color name or #RGB code]Colored text[/color]
  • [i]Italic text[/i]
  • [img]Link to image[/img]
  • [right]Align text or image right[/right]
  • [s]Strike-through text[/s]
  • [size=pixelsize]Big or small text[/size]
  • [u]Underlined text[/u]
  • [url]Link to website[/url]
  • [url=link to website]Link text[/url]