Page 1 of 2

Shoutbox Mod problem, changed server

Posted: Wed Jul 12, 2006 9:31 pm
by Heeter
Hi Guys,

I moved my forums onto a new tower. I copied and pasted the forum and the sql folders over. The forums (phpBB2.0.19) are pretty much up and running okay, as is the database (Mysql5.0). The problem is with the shoutbox.

It was working fine in previous setup, but I cannot get it to work properly here. There is no previous entries listed, and when I put in a new shoutbox entry the screen goes white.

I tried running shoutbox_install.php and this the errors that I am getting.

Image

Anyone can tell me what I need to do to fix?


Thanks in advance,


Heeter

Posted: Thu Jul 13, 2006 3:46 am
by Heeter
Here is the error when logging onto site.

Image



Thanks again,

Heeter

Posted: Thu Jul 13, 2006 4:15 am
by Heeter
Hi all,

I just tried upgrading to 0.1.3 and I am still gettings the same errors.


Thanks,

Heeter

Posted: Thu Jul 13, 2006 5:32 am
by battye
Did you apply the changes to constants.php? Looks like you didn't:)

Posted: Thu Jul 13, 2006 1:50 pm
by Heeter
Hi Battye,

Yes I did mod the constants.php file.

Code: Select all

// Shoutbox MOD
define('SHOUTBOX_TABLE', $table_prefix.'shoutbox');

Same error.

Thanks,

Heeter

Posted: Thu Jul 13, 2006 1:53 pm
by battye
Could you please paste the contents of shoutbox_install.php here?

Don't forget to use the

Code: Select all

 tag.

Posted: Thu Jul 13, 2006 2:16 pm
by Heeter

Code: Select all

http://hcctech.ca/forums/index.php
Now I have two shoutboxes, one on top and one on the bottom. Must be from the 013 mod.

Here is the sboutbox_install.php

Code: Select all


<?php
/***************************************************************************
 *                               shoutbox_install.php
 *                            -------------------
 *   begin                : Sat, Oct 26, 2005
 *   copyright          : (C) 2005 Battye @ CricketMX.com
 *   email                : cricketmx@hotmail.com
 *
 *   $Id: shoutbox.php, v1 (October 2005) battye 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.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//include($phpbb_root_path . 'config.'.$phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

$sql = array();
$sql[] = "CREATE TABLE `" . SHOUTBOX_TABLE . "` (
  `shoutbox_id` int(5) NOT NULL default '0',
  `shoutbox_datetime` VARCHAR( 255 ) NOT NULL default '',
  `shoutbox_text` varchar(255) NOT NULL default '',
  `shoutbox_author` int(5) NOT NULL default '0'
);";

$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('guest_shoutbox', '0')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('rows_shoutbox', '5')";

	for ($i = 0; $i < count($sql); $i++) 
	{
		if( !$db->sql_query($sql[$i]) )
		{
		echo $i . ': The shoutbox table / rows could not be created (' . $sql[$i] . ')( ' . $db->sql_error() . ' )<br />';
		}
	}
	
message_die(GENERAL_MESSAGE, $lang['Shoutbox_table_made']);	
?>

Thanks for your help, Battye.

Heeter

Posted: Thu Jul 13, 2006 2:37 pm
by battye
Try changing:

Code: Select all

$sql = array();
$sql[] = "CREATE TABLE `" . SHOUTBOX_TABLE . "` (
  `shoutbox_id` int(5) NOT NULL default '0',
  `shoutbox_datetime` VARCHAR( 255 ) NOT NULL default '',
  `shoutbox_text` varchar(255) NOT NULL default '',
  `shoutbox_author` int(5) NOT NULL default '0'
);";
To

Code: Select all

$sql = array();
$sql[] = "CREATE TABLE " . SHOUTBOX_TABLE . " (
  `shoutbox_id` int(5) NOT NULL default '0',
  `shoutbox_datetime` VARCHAR( 255 ) NOT NULL default '',
  `shoutbox_text` varchar(255) NOT NULL default '',
  `shoutbox_author` int(5) NOT NULL default '0'
);";
If that doesn't work, try:

Code: Select all

$sql = array();
$sql[] = "CREATE TABLE phpbb_shoutbox (
  `shoutbox_id` int(5) NOT NULL default '0',
  `shoutbox_datetime` VARCHAR( 255 ) NOT NULL default '',
  `shoutbox_text` varchar(255) NOT NULL default '',
  `shoutbox_author` int(5) NOT NULL default '0'
);";

Posted: Thu Jul 13, 2006 2:49 pm
by Heeter
Hi battye,

Sorry, bud, no help, same errors.

Heeter

Posted: Thu Jul 13, 2006 2:52 pm
by Heeter
If I was to do a fresh install of 2.0.19, then did a restore backup through the admin panel, then fresh installed 0.1.3 Shoutbox, would it work, or work the restore backup put shoutbox 0.1.2 back in? cause it was in the restore backup that this started happening.

Hope you understand what I am asking. LOLOL

Heeter

Posted: Thu Jul 13, 2006 2:57 pm
by battye
Heeter wrote:If I was to do a fresh install of 2.0.19, then did a restore backup through the admin panel, then fresh installed 0.1.3 Shoutbox, would it work, or work the restore backup put shoutbox 0.1.2 back in? cause it was in the restore backup that this started happening.

Hope you understand what I am asking. LOLOL

Heeter
I was referring to the first error regarding shoutbox_install.php.. are you sure that when you try the code changes above you get the same error?

In particular I'm referring to the very first error where it says CREATE TABLE `SHOUTBOX_TABLE` ....

Posted: Thu Jul 13, 2006 4:10 pm
by Heeter
Image

Heeter

Posted: Thu Jul 13, 2006 4:12 pm
by Heeter
Even though it says "Shoutbox table created successfully" I still get debug errors upon login.


Thanks,

Heeter

Posted: Thu Jul 13, 2006 4:21 pm
by battye
On index.php you should find a few instances of:

Code: Select all

" . SHOUTBOX_TABLE . "
Replace them with

Code: Select all

phpbb_shoutbox
:)

Posted: Thu Jul 13, 2006 4:35 pm
by Heeter
I did replace..(2instances)...... and the same error as posted above.


Thanks for your Help, Battye

Heeter