probleem
Geplaatst: 12 jul 2003, 09:56
Since some time, I and my users keep getting the following error :
We get this error after posting a message and clicking the "click here to view your message" button. We don't get this error when returning to the list of topics.
If you don't understand my, try posting a message at my board and after that clicking the button to view your message.
my board is located at http://members.lycos.nl/uberacer/phpBB2/index.php
I got this error since I ran the "database install script" of the card mod.
Here it is:
nb: het bovenste bericht is in het engels, maar je kunt gewoon nederlands antwoorden. ik heb veel op engelse forums gepost en had geen zin het verhaal nog eens in het nederlands over te typpen.
Code: Selecteer alles
Could not obtain topic information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near 'BY p.post_id ASC' at line 5
SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments, f.auth_ban, f.auth_greencard, f.auth_bluecard, COUNT(p2.post_id) AS prev_posts FROM forum3vb_topics t, forum3vb_forums f, forum3vb_posts p, forum3vb_posts p2 WHERE p.post_id = 1048 AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= 1048 AND f.forum_id = t.forum_id GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments , f.auth_ban, f.auth_greencard, f.auth_bluecardORDER BY p.post_id ASC
Line : 150
File : /data/members/free/tripod/nl/u/b/e/uberacer/htdocs/phpBB2/viewtopic.php
If you don't understand my, try posting a message at my board and after that clicking the button to view your message.
my board is located at http://members.lycos.nl/uberacer/phpBB2/index.php
I got this error since I ran the "database install script" of the card mod.
Here it is:
Code: Selecteer alles
<?
#########################################################
## SQL commands to phpBB2
## Author: Niels Chr. Rød
## Nickname: Niels Chr. Denmark
## Web: http://mods.db9.dk
## Email: ncr@db9.dk
##
## Ver 1.0.9
##
## phpBB2 database update script for mods
## this file is intended to use with phpBB2, when installing mods
## after so you may delete this file, but only admin can use so it really doesen't matter
## The script will look what prefix you are using, and use the existing DB defined by congig.php
## The execution of this script's included SQL is harmless, so you can run it as meny times you like
## note, though that the users last visit, will be set back to his/her last login,
## but that is a minor cosmetic isue, that will correct it self next time the use logs in
##
## the following example are from my mods, and you can add some self, for other mods if you like
## you will after execution get a list over those commands that are run with succes and those with warnings !
## delete the sample lines if you are using it only for other mods
##
#########################################################
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
'ALTER TABLE '.FORUMS_TABLE.' ADD auth_ban TINYINT (2) not null DEFAULT "3"',
'ALTER TABLE '.FORUMS_TABLE.' ADD auth_greencard TINYINT (2) not null DEFAULT "5"',
'ALTER TABLE '.FORUMS_TABLE.' ADD auth_bluecard TINYINT (2) not null DEFAULT "1"',
'ALTER TABLE '.AUTH_ACCESS_TABLE.' ADD auth_ban TINYINT (1) not null DEFAULT "0"',
'ALTER TABLE '.AUTH_ACCESS_TABLE.' ADD auth_greencard TINYINT (1) not null DEFAULT "0"',
'ALTER TABLE '.AUTH_ACCESS_TABLE.' ADD auth_bluecard TINYINT (1) not null DEFAULT "0"',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("bluecard_limit", "3")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("bluecard_limit_2", "1")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("max_user_bancard", "10")',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("report_forum", "0")',
'ALTER TABLE '.USERS_TABLE.' ADD user_warnings SMALLINT (5) DEFAULT "0"',
'ALTER TABLE '.POSTS_TABLE.' ADD post_bluecard TINYINT (1)'
);
$mods = array (
'Yellow Card Mod','Yellow Card Mod','Yellow Card Mod','Yellow Card Mod','Yellow Card Mod',
'Yellow Card Mod','Yellow Card Mod','Yellow Card Mod','Yellow Card Mod','Yellow Card Mod',
'Yellow Card Mod','Yellow Card Mod'
);
############################################### Do not change anything below this line #######################################
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if ($userdata['user_level']!=ADMIN)
message_die(GENERAL_ERROR, "You are not Authorised to do this");
$n=0;
$message="<b>This list is a result of the SQL queries needed for this Mod</b><br/><br/>";
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if(!$result = $db->sql_query($sql[$n]))
$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
$n++;
}
message_die(GENERAL_MESSAGE, $message);
?>
nb: het bovenste bericht is in het engels, maar je kunt gewoon nederlands antwoorden. ik heb veel op engelse forums gepost en had geen zin het verhaal nog eens in het nederlands over te typpen.