Page 1 of 1

SQL error on install

Posted: 24. October 2008 03:36
by Myaj
Your Portal Version: 1.0.2
Your phpBB Type: Premodded phpBB
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://www.hoofprintsacrosswi.com/forum

PHP Version: phpbb3

What have you done before the problem was there?
Followed install instructions

What have you already tryed to solve the problem?
Re-tried install 3 times, searched forums, tried both 1.0.1 and 1.0.2 installs AND the "alternative install" I found in another thread with the same error. Purged cache.

Description and Message
Well, same problem everyone else is having from what it looks like on the forum.

I've tried checking and rechecking, completely restoring files to pre-mod and starting over, starting over with the different install.

No matter what I do, when I go to run the forum/install_portal/install.php I get this error:

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Table 'hoofprin_hoofprinphpBB3.phpbb_portal_config' doesn't exist [1146]

SQL

SELECT config_value as version FROM phpbb_portal_config WHERE config_name = 'portal_version' LIMIT 1

BACKTRACE

FILE: includes/db/mysql.php
LINE: 133
CALL: dbal_mysql->sql_error()

FILE: includes/db/mysql.php
LINE: 180
CALL: dbal_mysql->sql_query()

FILE: includes/db/dbal.php
LINE: 145
CALL: dbal_mysql->_sql_query_limit()

FILE: install_portal/install.php
LINE: 51
CALL: dbal_mysql->sql_query_limit()


Any help would be greatly appreciated, as my board is pretty much stuck here until I get this working and I still have a lot of work to do! :)[/i]

Re: SQL error on install

Posted: 24. October 2008 03:47
by Ice
Hmm, the error should be suppressed but obviously it is not. I'll see what I can come up with.

For the mean time, open install.php and delete:

Code: Select all

			FROM ' . PORTAL_CONFIG_TABLE . "
			WHERE config_name = 'portal_version'";
	$result = @$db->sql_query_limit( $sql, 1 );
	$version = $db->sql_fetchrow( $result );
	if( sizeof( $version ) )
	{
		$old_version = strtolower($version['version']);
	}
	else
	{
		$db->sql_freeresult( $result );
		$sql = 'SELECT config_value as version 
				FROM ' . CONFIG_TABLE . "
				WHERE config_name = 'portal_version'";
		$result = @$db->sql_query_limit( $sql, 1 );
		$version = $db->sql_fetchrow( $result );
		if( sizeof( $version ) )
		{
			$phpbb3portal = true;
			$old_version = ( strtolower($version['version']) == '1.1.0.b' ) ? '1.1.0b' : strtolower($version['version']) ;
		}
	}
	$db->sql_freeresult( $result );

Re: SQL error on install

Posted: 24. October 2008 04:30
by Myaj
I'm starting with this:

Code: Select all

$old_version = 0;
	$phpbb3portal = false;
	$installed = $updated = $uninstalled =false;
	
	$sql = 'SELECT config_value as version 
			FROM ' . PORTAL_CONFIG_TABLE . "
			WHERE config_name = 'portal_version'";
	$result = @$db->sql_query_limit( $sql, 1 );
	$version = $db->sql_fetchrow( $result );
	if( sizeof( $version ) )
	{
		$old_version = strtolower($version['version']);
	}
	else
	{
		$db->sql_freeresult( $result );
		$sql = 'SELECT config_value as version 
				FROM ' . CONFIG_TABLE . "
				WHERE config_name = 'portal_version'";
When I delete what you stated above I have this:

Code: Select all

$old_version = 0;
	$phpbb3portal = false;
	$installed = $updated = $uninstalled =false;
	
	else
	{
		$db->sql_freeresult( $result );
		$sql = 'SELECT config_value as version 
				FROM ' . CONFIG_TABLE . "
				WHERE config_name = 'portal_version'";
Which gives me this error:
Parse error: syntax error, unexpected T_ELSE in /home/hoofprin/public_html/forum/install_portal/install.php on line 48

I tried deleting that else followed by the {, but that just gave me an error farther down the page. I don't know enough about the code to guess anymore at what to do?

Re: SQL error on install

Posted: 24. October 2008 04:32
by Myaj
Dang, and now my entire board is giving that error about the missing table.. not just when I run the install.

Re: SQL error on install

Posted: 24. October 2008 13:18
by Ice
Hmm half the code I posted cut off, what I meant to say was that you need to delete:

Code: Select all

	$sql = 'SELECT config_value as version 
			FROM ' . PORTAL_CONFIG_TABLE . "
			WHERE config_name = 'portal_version'";
	$result = @$db->sql_query_limit( $sql, 1 );
	$version = $db->sql_fetchrow( $result );
	if( sizeof( $version ) )
	{
		$old_version = strtolower($version['version']);
	}
	else
	{
		$db->sql_freeresult( $result );
		$sql = 'SELECT config_value as version 
				FROM ' . CONFIG_TABLE . "
				WHERE config_name = 'portal_version'";
		$result = @$db->sql_query_limit( $sql, 1 );
		$version = $db->sql_fetchrow( $result );
		if( sizeof( $version ) )
		{
			$phpbb3portal = true;
			$old_version = ( strtolower($version['version']) == '1.1.0.b' ) ? '1.1.0b' : strtolower($version['version']) ;
		}
	}
	$db->sql_freeresult( $result );

Re: SQL error on install

Posted: 24. October 2008 16:47
by Myaj
I was hoping it was as simple as it getting cut off :)

Thank you I'll try that edit and let you know if it works.

Re: SQL error on install

Posted: 24. October 2008 17:03
by Myaj
Okay, that allowed me to run the installer, which looked perfect, then I deleted the install_portal folder.

Now I'm getting this error:
Fatal error: Call to undefined function: bbcode_nl2br() in /home/hoofprin/public_html/forum/portal/block/poll.php on line 323

Re: SQL error on install

Posted: 24. October 2008 19:38
by Ice
Strange as that function comes from the functions.php that should have been included already.

At the top of portal.php check there is the line

Code: Select all

include($phpbb_root_path . 'portal/includes/functions.'.$phpEx);

Re: SQL error on install

Posted: 24. October 2008 21:06
by Myaj
Yes, it is there:

Code: Select all

define('IN_PHPBB', true);
define('IN_PORTAL', true);

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'portal/includes/functions.'.$phpEx);

$portal_config = obtain_portal_config();
For what its worth, the portal page came up perfect after the install... just with the note to delete the install folder. As soon as I deleted the install though, no more portal.

Re: SQL error on install

Posted: 25. October 2008 15:47
by Myaj
Do you think if I backup to a different version it might work?