View Full Version : Multi-Forum SQL Error
cardude
05-31-2006, 05:03 PM
Ok, when I try to install the Multi-Forum script, I keep getting an error "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') TYPE=MYISAM' at line 38", but I don't know how to fix it. I have MySQL v4.0.26.
ForumZCLub
06-01-2006, 10:54 AM
Update the install_queries.php
Download this updated file.
http://www.nbsdesignz.com/forums/attachment.php?attachmentid=614&d=1149107113
Derek
06-01-2006, 04:11 PM
Yup. After you do that it should work. Sorry about that I had a comma in the SQL code that shouldn't have been there.
Derek
cardude
06-01-2006, 05:04 PM
Ok, I will try that! I tried fixing it myself, but I was looking at the Type=MyISAM part, not the rest of the code.
Thanks!
Derek
06-01-2006, 07:31 PM
No Problem :). Let me know if you have anymore problems with it.
Derek
cardude
06-01-2006, 10:54 PM
Yes, it installs. I must not have something else right because now I get a few other SQL errors. That is alright, I was just testing it.
Page - http://testforum2999.te.funpic.org/multiforum/nbs/login.php
Error
Warning: mysql_fetch_array(): The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH. in /usr/export/www/hosting/testforum2999/multiforum/nbs/class_database.php on line 42
Warning: mysql_fetch_array(): The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH. in /usr/export/www/hosting/testforum2999/multiforum/nbs/class_database.php on line 42
Warning: Smarty error: unable to read resource: "script_offline.tpl" in /usr/export/www/hosting/testforum2999/multiforum/nbs/smarty/Smarty.class.php on line 1093
You don't need to fix it.
Derek
06-01-2006, 11:44 PM
You probably forgot to CHMOD something or something. If you want me to look into it for you, I will. Let me know.
Derek
ForumZCLub
06-02-2006, 12:11 PM
Hey i get the same errors that he does
I too followed all the steps
Could you look into my problem too?
ForumZCLub
06-02-2006, 12:17 PM
Warning: Smarty error: unable to read resource:
"script_offline.tpl" in /usr/export/www/hosting/
testforum2999/multiforum/nbs/smarty/Smarty.class.php
on line 1093
ForumZCLub
06-02-2006, 12:17 PM
I dont get the first two errors though!
Derek
06-02-2006, 03:41 PM
Try executing this query. Perhaps your template field in the settings table wasn't set.
UPDATE nbs_settings SET template='default' WHERE id='1';
I think the install code was missing the default for that field, it will be fixed in the next version which should be release either tonight or tomorrow sometime.
Derek
ForumZCLub
06-03-2006, 11:33 AM
Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/local/lib/php') in /home/.cury/kapilmehra/forumzclub.com/bb/common.php on line 219
Ran the query now this is what i get(what i wrote above)
Error Update!
ForumZCLub
06-03-2006, 11:38 AM
Warning: Smarty error: unable to read resource: "script_offline.tpl" in /home/.cury/kapilmehra/forumzclub.com/bb/nbs/smarty/Smarty.class.php on line 1093
The error is still there and of no help!
Error Links
http://www.forumzclub.com/bb/
http://www.forumzclub.com/bb/new_forum.php
Derek
06-03-2006, 12:28 PM
Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/local/lib/php') in /home/.cury/kapilmehra/forumzclub.com/bb/common.php on line 219
Ran the query now this is what i get(what i wrote above)
Error Update!
You have to set the error page URLS in the Admin Panel Under General Settings. Once you do that the error should go away.
Derek
06-03-2006, 12:29 PM
Warning: Smarty error: unable to read resource: "script_offline.tpl" in /home/.cury/kapilmehra/forumzclub.com/bb/nbs/smarty/Smarty.class.php on line 1093
The error is still there and of no help!
Error Links
http://www.forumzclub.com/bb/
http://www.forumzclub.com/bb/new_forum.php
How did you execute the query? PHPMyAdmin? Also check and make sure the /nbs/templates/default/ folder is there as well as the script_offline.tpl file. If you want me to look over everything, please PM me FTP info.
Thanks,
Derek
Derek
06-03-2006, 12:33 PM
I just tried looking at http://www.forumzclub.com/bb/nbs/templates/ and got a forbidden message. Try CHMODing it to 755 and see if it works then.
ForumZCLub
06-03-2006, 02:03 PM
I send u the info u requested
It was not working yet
.Hybrid
06-05-2006, 03:18 AM
Hey, everything was going alright for me, I added that file and everything. I created a forum, but when I try to go to it, it says:
Parse error: syntax error, unexpected T_IF in /home/forumeli/public_html/phpbb/common.php on line 194
What have I done?
Derek
06-05-2006, 06:48 AM
Paste the contents of common.php please. You probably messed up while editing that file.
Derek
ForumZCLub
06-06-2006, 03:56 AM
Thanks for solving the thing
Derek
06-06-2006, 06:45 AM
No Problem :).
.Hybrid
06-06-2006, 07:12 AM
Here it is. Looks likes it's missing the start of the php, but I don't know very much about php, so please help.
= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off'))
{
$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_COOKIE_VARS = $_COOKIE;
$HTTP_ENV_VARS = $_ENV;
$HTTP_POST_FILES = $_FILES;
// _SESSION is the only superglobal which is conditionally set
if (isset($_SESSION))
{
$HTTP_SESSION_VARS = $_SESSION;
}
}
// Protect against GLOBALS tricks
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
die("Hacking attempt");
}
// Protect against HTTP_SESSION_VARS tricks
if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS))
{
die("Hacking attempt");
}
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
{
// PHP4+ path
$not_unset = array('HTTP_GET_VARS', 'HTTP_POST_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_SESSION_VARS', 'HTTP_ENV_VARS', 'HTTP_POST_FILES', 'phpEx', 'phpbb_root_path');
// Not only will array_merge give a warning if a parameter
// is not an array, it will actually fail. So we check if
// HTTP_SESSION_VARS has been initialised.
if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS))
{
$HTTP_SESSION_VARS = array();
}
// Merge all into one extremely huge array; unset
// this later
$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES);
unset($input['input']);
unset($input['not_unset']);
while (list($var,) = @each($input))
{
if (!in_array($var, $not_unset))
{
unset($$var);
}
}
unset($input);
}
//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
if( is_array($HTTP_GET_VARS) )
{
while( list($k, $v) = each($HTTP_GET_VARS) )
{
if( is_array($HTTP_GET_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
{
$HTTP_GET_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_GET_VARS[$k]);
}
else
{
$HTTP_GET_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_GET_VARS);
}
if( is_array($HTTP_POST_VARS) )
{
while( list($k, $v) = each($HTTP_POST_VARS) )
{
if( is_array($HTTP_POST_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
{
$HTTP_POST_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_POST_VARS[$k]);
}
else
{
$HTTP_POST_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_POST_VARS);
}
if( is_array($HTTP_COOKIE_VARS) )
{
while( list($k, $v) = each($HTTP_COOKIE_VARS) )
{
if( is_array($HTTP_COOKIE_VARS[$k]) )
{
while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
{
$HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
}
@reset($HTTP_COOKIE_VARS[$k]);
}
else
{
$HTTP_COOKIE_VARS[$k] = addslashes($v);
}
}
@reset($HTTP_COOKIE_VARS);
}
}
//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$dss_seeded = false;
$gen_simple_header = FALSE;
include($phpbb_root_path . 'config.'.$phpEx);
// Start: NBSdesignz Multi-Forums phpBB
include('nbs/nbs_config.php');
define('TABLE_PREFIX', $config['Database']['prefix']);
mysql_connect($config['Database']['host'], $config['Database']['username'], $config['Database']['password']);
mysql_select_db($config['Database']['name']);
$setting1 = "SELECT * FROM ".TABLE_PREFIX."settings WHERE id='1'";
$setting2 = mysql_query($setting1);
$setting = mysql_fetch_array($setting2);
if ($forum)
{
if (file_exists($phpbb_root_path . 'nbs/configs/config_'.$forum.'.'.$phpEx))
{
$details1 = "SELECT status, header_ads, footer_ads FROM ".TABLE_PREFIX."users WHERE accessname='".mysql_real_escape_string($forum)."'";
$details2 = mysql_query($details1);
$details3 = mysql_fetch_array($details2);
$status = $details3['status'];
$header_ads = $details3['header_ads'];
$footer_ads = $details3['footer_ads'];
mysql_close();
if ($status != 'Active')
{
include($setting['forum_not_active_url']);
exit;
}
else
{
include($phpbb_root_path . 'nbs/configs/config_'.$forum.'.'.$phpEx);
}
}
else
{
include($setting['forum_does_not_exist_url']);
exit;
}
}
else
{
include($setting['no_forum_selected_url']);
exit;
}
// End: NBSdesignz Multi-Forums phpBB
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
// We do not need this any longer, unset for safety purposes
unset($dbpasswd);
//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR') );
$user_ip = encode_ip($client_ip);
//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}
?>
Thanks!
Derek
06-06-2006, 12:48 PM
Try using this file. It has already been edited by me with the edits. Let me know if you have anymore problems.
Derek
.Hybrid
06-06-2006, 08:47 PM
Hmm, I uploaded the file, now I have a different error.
Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/forumeli/public_html/phpbb/common.php on line 203
Thanks!
Derek
06-06-2006, 09:08 PM
You need to set the error page URLs in the Admin CP under Settings.
Derek
.Hybrid
06-06-2006, 09:35 PM
Alright, got that working. But the images aren't.
http://forumelite.ahplace.com/phpbb/test/index.php
Thanks heaps!
Derek
06-07-2006, 11:59 AM
Make sure the phpBB images are there, because http://forumelite.ahplace.com/phpbb/templates/subSilver/images/logo_phpBB.gif gives me a 404. They should have came with phpBB, so try reuploading the templates folder from the phpBB files and see if that fixes it.
Derek
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.