Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: "db_tables_error" variable are not defined  (Read 4104 times)

piko

  • Guest
"db_tables_error" variable are not defined
« on: April 22, 2008, 10:17:22 AM »

snews.php  / function db()  variable 'db_tables_error' missing

This bug never appears in normal condition when all tables exists.

Best regards

Piko
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: "db_tables_error" variable are not defined
« Reply #1 on: April 22, 2008, 03:01:12 PM »

snews.php  / function db()  variable 'db_tables_error' missing
This bug never appears in normal condition when all tables exists.
Best regards - Piko

Piko... would you mind telling us what the purpose of your post is?  Is it not a 'given' that having all tables in place will ensure you don't get the message ???
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: "db_tables_error" variable are not defined
« Reply #2 on: April 22, 2008, 04:15:10 PM »

He want to tell as a variable is missing from sNews16.

Code: [Select]
<?php
// DATABASE VARIABLES

function db($variable) {
$db = array();
$db['dbhost'] = 'localhost'//MySQL Host
$db['dbname'] = 'snews17'//Database Name
$db['dbuname'] = 'root'//Database Username
$db['dbpass'] = ''//Database password
$db['prefix'] = ''//Database prefix
$db['dberror'] = '<strong>There was an error while connecting to the database.</strong> <br /> Check your database settings.'//Database error message

$db['db_tables_error'] = '<strong>Your database table "prefix" is incorrect OR your database tables have not been created.</strong> <br /> Check your database "prefix" setting OR create your database tables (see <a href="'._SITE.'readme.html">readme.html</a>).'//Database table error message

return $db[$variable];

}

Is present in sNews17RC but missing from official sNews16.....
Is present also in modified versions of sNews16.

I noticed something... bugfix versions of sNews16 are missing. Here are posted bugs and solutions but does not appear in an official release of sNews16....
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: "db_tables_error" variable are not defined
« Reply #3 on: April 22, 2008, 05:50:21 PM »

He want to tell as a variable is missing from sNews16.

Code: [Select]
<?php
// DATABASE VARIABLES

function db($variable) {
$db = array();
$db['dbhost'] = 'localhost'//MySQL Host
$db['dbname'] = 'snews17'//Database Name
$db['dbuname'] = 'root'//Database Username
$db['dbpass'] = ''//Database password
$db['prefix'] = ''//Database prefix
$db['dberror'] = '<strong>There was an error while connecting to the database.</strong> <br /> Check your database settings.'//Database error message

$db['db_tables_error'] = '<strong>Your database table "prefix" is incorrect OR your database tables have not been created.</strong> <br /> Check your database "prefix" setting OR create your database tables (see <a href="'._SITE.'readme.html">readme.html</a>).'//Database table error message

return $db[$variable];

}

1 - Is present in sNews17RC but missing from official sNews16.....
2 - Is present also in modified versions of sNews16.
3 - I noticed something... bugfix versions of sNews16 are missing. Here are posted bugs and solutions but does not appear in an official release of sNews16....

1 - The $db['db_tables_error'] string was never included in the default sNews 1.6 package.
2 - What "modified versions"of sNews 1.6 is it included in?
3 - The currently available sNews 1.6 download should contain - at least - the bug fixes that were in the files available in this post. Some more recent bug-fixes posted after that point in time may not be included in the download currently available from the Download page on this website.  :)

Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Joost

  • Guest
Re: "db_tables_error" variable are not defined
« Reply #4 on: April 22, 2008, 07:04:20 PM »


1 - The $db['db_tables_error'] string was never included in the default sNews 1.6 package.
2 - What "modified versions"of sNews 1.6 is it included in?
3 - The currently available sNews 1.6 download should contain - at least - the bug fixes that were in the files available in this post. Some more recent bug-fixes posted after that point in time may not be included in the download currently available from the Download page on this website.  :)


1, 2 ) That's the whole point. If function connect_to_db makes the call for db('db_tables_error'), then $db['db_tables_error'] must be there.
The official 1.6 makes that call. $db['db_tables_error'] is not in there
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: "db_tables_error" variable are not defined
« Reply #5 on: April 22, 2008, 09:39:54 PM »

1, 2 ) That's the whole point. If function connect_to_db makes the call for db('db_tables_error'), then $db['db_tables_error'] must be there.
The official 1.6 makes that call. $db['db_tables_error'] is not in there

Well... thanks for that revelation Joost. I downloaded it and had a look a few minutes ago. I would never have known otherwise.  :o
I suppose I should read the Patches forum more often.  :P
EDIT:
I downloaded and checked the snews.php file. Although more patches have been obviously added to the file... the same "Patches Added" date I put at the top of that file on Jan.14.08 is still there - un-changed. I suggest that a Revision Date be noted at the top of the file each time another patch is added... so the rest of the world will know when it was last revised.
« Last Edit: April 22, 2008, 09:59:26 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU