Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.8
Author Message
southern
Client



Joined: Jan 29, 2004
Posts: 624

PostPosted: Sat Feb 21, 2004 10:08 pm Reply with quote

I installed a chatbox in my forum and now there is no forum, just the SQL errors, or rather two errors:
Code:
General Error 

 
Could not check session for Ghosts

DEBUG MODE

SQL Error : 1146 Table 'southern_nuke1.chatbox_session' doesn't exist

DELETE FROM chatbox_session WHERE lastactive < '1077420792'

Line : 38
File : /home/southern/public_html/modules/Forums/chatbox_front.php

I commented out the GHOST line in chatbox_front.php and refreshed, and the second error showed:
Code:


SQL Error : 1146 Table 'southern_nuke1.chatbox_session' doesn't exist

SELECT * FROM chatbox_session

Line : 45
File : /home/southern/public_html/modules/Forums/chatbox_front.php

It seems the prob is that an expected table doesn't exist. I used the Import SQL function in PHPMyAdmin. Any ideas?

The install.txt:

##############################################################
## MOD Title: ChatBox
## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
## MOD Description: This will add a LIVE chatbox on your phpBB2
## Only registered users can chat. Admin can take
## control chatroom by some commands(/KICK username, /CLEAR). Smilies enabled.
## Only tested with phpBB 2.0.x/MySQL
## MOD Version: 1.1.9e
##
## Installation Level: easy
## Installation Time: 10 Minutes
## Files To Edit: 3
## index.php
## templates/subSilver/index_body.tpl
## language/lang_english/lang_main.php
##
## Included Files: 10
## chatbox_db_install.php (only required for DB install)
## chatbox_front.php
## chatbox_mod/chatbox.css
## chatbox_mod/chatbox.php
## chatbox_mod/chatbox_config.php
## chatbox_mod/chatbox_drop.php
## chatbox_mod/chatbox_function.php
## chatbox_mod/messenger_list.php
## chatbox_mod/messenger_send.php
## chatbox_mod/messenger_view.php
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## Author Notes:
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]---------------------------------------------
#
index.php

#
#-----[ FIND ]---------------------------------------------
#
$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),

#
#-----[ BEFORE, ADD ]--------------------------------------
#
// ChatBox Mod
require_once($phpbb_root_path . 'chatbox_front.php');

#
#-----[ FIND ]---------------------------------------------
#
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],

#
#-----[ AFTER, ADD ]--------------------------------------
#
// ChatBox Mod
'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ], $chatters),
'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox', // To make easier to test on my PC
'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],

#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]---------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]--------------------------------------
#
// ChatBox Mod
$lang['How_Many_Chatters'] = 'There are <B>%d</B> user(s) on chat now';
$lang['Who_Are_Chatting' ] = '<B>%s</B>';
$lang['Click_to_join_chat'] = 'Click to join chat';
$lang['ChatBox'] = 'ChatBox';
$lang['log_out_chat'] = 'You have successfully logged out from chat on ';
$lang['Send'] = 'Send';
$lang['Login_to_join_chat'] = 'Login to join chat';


#
#-----[ OPEN ]--------------------------------------------
#
templates/subSilver/index_body.tpl

#
#-----[ FIND ]--------------------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>

#
#-----[ REPLACE WITH ]------------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>

#
#-----[ FIND ]---------------------------------------------
#
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
</tr>

#
#-----[ AFTER, ADD ]--------------------------------------
#
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_CHATTERS_ONLINE}&nbsp;&nbsp;&nbsp;
<!-- BEGIN switch_user_logged_out -->
[ {L_LOGIN_TO_JOIN_CHAT} ]
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
[ <a href="javascript:void(0);" onClick="window.open('{S_JOIN_CHAT}','{CHATBOX_NAME}','scrollbars=no,width=540,height=450')">{L_CLICK_TO_JOIN_CHAT}</a> ]
<!-- END switch_user_logged_in -->
<br />{CHATTERS_LIST}
</span>
</td>
</tr>

#
#-----[ COPY ]--------------------------------------------
#
copy chatbox_front.php to chatbox_front.php
copy chatbox_mod/*.* to chatbox_mod/

#
#-----[ SQL ]---------------------------------------------
# Run these folloing queries manually or run chatbox_db_install.php once
# Afterthat please remove your chatbox_db_install.php immediately
#
CREATE TABLE nuke_chatbox (
id int(11) NOT NULL auto_increment,
name varchar(99) NOT NULL,
msg varchar(255) NOT NULL,
timestamp int(10) unsigned NOT NULL,
PRIMARY KEY (id));

CREATE TABLE nuke_chatbox_session (
username varchar(99) NOT NULL,
lastactive int(10) DEFAULT '0' NOT NULL,
laststatus varchar(8) NOT NULL,
UNIQUE username (username));

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

_________________
Computer Science is no more about computers than astronomy is about telescopes.
- E. W. Dijkstra 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Feb 21, 2004 10:40 pm Reply with quote

If you are using phpmyadmin, look to see if the two tables exist. If they don't then your install didn't work. Did you try the install that the author provides (chatbox_db_install.php )? Or. just use phpmyadmin, go to the SQL window, copy and paste this code
Code:
CREATE TABLE nuke_chatbox ( 

id int(11) NOT NULL auto_increment,
name varchar(99) NOT NULL,
msg varchar(255) NOT NULL,
timestamp int(10) unsigned NOT NULL,
PRIMARY KEY (id));

CREATE TABLE nuke_chatbox_session (
username varchar(99) NOT NULL,
lastactive int(10) DEFAULT '0' NOT NULL,
laststatus varchar(8) NOT NULL,
UNIQUE username (username));
and click GO.
 
View user's profile Send private message
southern







PostPosted: Sat Feb 21, 2004 10:54 pm Reply with quote

Yes, I used the SQL function in PHPMyAdmin and clicked Go just the same as I've done and there was no error. SQL said the import succeeded. I have now examined the chatbox_front.php and I noticed a period after $table_chatbox_session_name:
Code:
<?php

/***************************************************************************
 *                      chatbox_front.php
 *                     -------------------
 *   begin            :   Sun July 07 2002
 *   copyright         :   (C) 2002 Smartor
 *   email            :   smartor_xp@hotmail.com
 *
 *   $Id: chatbox_front.php, v1.2.0 2002/11/11 17:54:51 ngoctu Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}

error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);

include_once($phpbb_root_path . 'config.'.$phpEx);

$table_chatbox_session_name = $table_prefix . 'chatbox_session';

// Kill Ghosts
//$sql = "DELETE FROM " . [b]$table_chatbox_session_name .[/b] " WHERE lastactive < '" . (time() - //300) . "'";
//if (!$result = $db->sql_query($sql))
//{
//   message_die(GENERAL_ERROR, "Could not check session for Ghosts", "", __LINE__, //__FILE__, $sql);
//}

// Get all remain sessions
$sql = 'SELECT * FROM ' . $table_chatbox_session_name;
if (!$sol = $db->sql_query($sql))
{
   message_die(GENERAL_ERROR, "Could not query ChatBox Session information", "", __LINE__, __FILE__, $sql);
}

$howmanychat = $db->sql_numrows($sol); // Return this

$isimler[0] = $howmanychat;

$i = 1;

while ($record = $db->sql_fetchrow($sol))
{
   $isimler[$i++] = $record['username'];
}

$chatters = $isimler[1];

for($s = 2; $s <= $isimler[0]; $s++)
{
   $chatters .= ", $isimler[$s]"; // Return this
}
?>


I'm wondering whether this period might have been interpreted as part of a table name, in which case the table wouldn't exist. Thanks, I'll go try that SQL import again, and if still no forum I'll run the install.php...


Last edited by southern on Sat Feb 21, 2004 10:58 pm; edited 1 time in total 
Raven







PostPosted: Sat Feb 21, 2004 10:57 pm Reply with quote

No. The period is a concatenation operator, ie. joining 2 expressions.
 
southern







PostPosted: Sat Feb 21, 2004 11:07 pm Reply with quote

OK, I waited for your reply before re-running the SQL import witth your code. I'll go do that now.
 
southern







PostPosted: Sat Feb 21, 2004 11:29 pm Reply with quote

I looked at my nuke tables in PHPMyAdmin and there are two chatbox tables:nuke_chatbox and nuke_chatbox_session... should I still re-run the SQL import or try the install php file? Or perhaps it'd be quicker if I just PMed you my admin password? Smile
Could it be a chmod issue?


Last edited by southern on Sat Feb 21, 2004 11:31 pm; edited 1 time in total 
Raven







PostPosted: Sat Feb 21, 2004 11:31 pm Reply with quote

Drop the tables and try the import script.
 
southern







PostPosted: Sat Feb 21, 2004 11:46 pm Reply with quote

Run the install php file? OK... does it matter that the chatbox tables are listed in the SQL database?
 
southern







PostPosted: Sat Feb 21, 2004 11:54 pm Reply with quote

OK... got these errors:
Code:


Warning: main(includes/constants.php): failed to open stream: No such file or directory in /home/southern/public_html/modules/Forums/common.php on line 168

Warning: main(): Failed opening 'includes/constants.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southern/public_html/modules/Forums/common.php on line 168

Warning: main(includes/template.php): failed to open stream: No such file or directory in /home/southern/public_html/modules/Forums/common.php on line 169

Warning: main(): Failed opening 'includes/template.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southern/public_html/modules/Forums/common.php on line 169

Warning: main(includes/sessions.php): failed to open stream: No such file or directory in /home/southern/public_html/modules/Forums/common.php on line 170

Warning: main(): Failed opening 'includes/sessions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southern/public_html/modules/Forums/common.php on line 170

Warning: main(includes/auth.php): failed to open stream: No such file or directory in /home/southern/public_html/modules/Forums/common.php on line 171

Warning: main(): Failed opening 'includes/auth.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southern/public_html/modules/Forums/common.php on line 171

Warning: main(includes/functions.php): failed to open stream: No such file or directory in /home/southern/public_html/modules/Forums/common.php on line 172

Warning: main(): Failed opening 'includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/southern/public_html/modules/Forums/common.php on line 172

Fatal error: Call to undefined function: append_sid() in /home/southern/public_html/modules/Forums/common.php on line 181


Now I wonder if I put the files in the right directories. I put chatbox_mod in modules/Forums/
 
southern







PostPosted: Sun Feb 22, 2004 8:53 am Reply with quote

Took off the thing last night through PHPMyAdmin drop tables... Live and learn. At least my forum is back. Thanks for the suggestions, Raven, I assume now this version of chatbox doesn't work with my version of phpbb.
 
southern







PostPosted: Mon Nov 29, 2004 9:39 am Reply with quote

A visitor asked my advice about this error:
Code:


Warning: main(./includes/constants.php): failed to open stream: No such file or directory in /home/xdonlin/public_html/forum/common.php on line 119

Warning: main(): Failed opening './includes/constants.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xdonlin/public_html/forum/common.php on line 119

Warning: main(./includes/template.php): failed to open stream: No such file or directory in /home/xdonlin/public_html/forum/common.php on line 120

Warning: main(): Failed opening './includes/template.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xdonlin/public_html/forum/common.php on line 120

Warning: main(./includes/sessions.php): failed to open stream: No such file or directory in /home/xdonlin/public_html/forum/common.php on line 121

Warning: main(): Failed opening './includes/sessions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xdonlin/public_html/forum/common.php on line 121

Warning: main(./includes/auth.php): failed to open stream: No such file or directory in /home/xdonlin/public_html/forum/common.php on line 122

Warning: main(): Failed opening './includes/auth.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xdonlin/public_html/forum/common.php on line 122

Warning: main(./includes/functions.php): failed to open stream: No such file or directory in /home/xdonlin/public_html/forum/common.php on line 123

Warning: main(): Failed opening './includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xdonlin/public_html/forum/common.php on line 123

Warning: main(./includes/db.php): failed to open stream: No such file or directory in /home/xdonlin/public_html/forum/common.php on line 124

Warning: main(): Failed opening './includes/db.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xdonlin/public_html/forum/common.php on line 124

Fatal error: Call to undefined function: append_sid() in /home/xdonlin/public_html/forum/common.php on line 132

What should I tell him? He apparently knows about this forum but contacted me through feedback...
Quote:

Sender's Name: Marcelo Souza
Sender's Email: marcelo at 3donline dot com dot br
Message: Hi there Man. I got a crazy error on my forum today, and i could not contact a friend of mine who knows more about PHP...I saw that you have the similar error some times ago...I saw it on this link : http://www.ravenphpscripts.com/postt1037.html If you could help me in some way...I will be very thankful. My english is not too good. I am from Brazil, and my forum is about computer animation. I own it alone and try to keep it on air without any great investment. Sad The site is on air for about 7 years and the forum, for about 1 year, with more than 4000 users... I can\'t leave it offline. Sad
So...I have the idea to ask you for a little tip, or help, to put it back online. Just any clue about this error, will be very valuable for me.
Thanks a lot man ! Smile
Take care...

Look at my error : http://www.3donline.com.br/forum/

Looks similar to your problem, and i read that you solved it, right ? Smile
Thanks again.: )
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.8

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©