Page 1 of 1

SQL Error

Posted: 28. July 2008 22:15
by SmauG
When i try to install portal, just after click submit (install v1.0.0RC1) i got this error:

Code: Select all

Error General
SQL ERROR [ mssql ]

El nombre de columna 'phpbb_portal_config' no es v?lido.
Invalid column name '%.*ls'. [207]

SQL

if exists (select * from sysobjects where name = phpbb_portal_config) drop table phpbb_portal_config

BACKTRACE

FILE: includes/db/mssql.php
LINE: 137
CALL: dbal->sql_error()

FILE: install_portal/install.php
LINE: 258
CALL: dbal_mssql->sql_query()

Re: SQL Error

Posted: 28. July 2008 23:01
by Heinrich-XIV
Hello

Have you made all the edits from the Portal install.xml?

You purged the cache after this?

It's a Problem with the constants.php file, I think.

Check all your files that you have edit of Errors or undo changes.



Greets

Heinrich

Re: SQL Error

Posted: 29. July 2008 01:30
by SmauG
Yes, i edited all files two times, and i also purged the cache, but error remains :(

I'm using mssql 2000, could be the problem?

Any ideas?


EDIT:

I've made a fresh forum install, with no changes, i only edited portal required files and uploaded portal files.
If i go to forum's root, i got this error:

Code: Select all

General Error
SQL ERROR [ mssql ]

El nombre de objeto 'phpbb_portal_config' no es v?lido.
Invalid object name '%.*ls'. [208]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.
I had this error last time, but i made that db manually.

This time i'll wait for an answer :)


Greetz

Re: SQL Error

Posted: 29. July 2008 05:12
by Heinrich-XIV
It could be, indeed.

Why don't you post this in your first Message? We can't give you the right Support without the required Information, so we can only give you an Answer of known Standard Problems, wich somtimes happens. :roll:

I think, Kevin knows more about this, so wait for his Answer.

@Kevin: What do you think about of a intregation from the "Support Ticket System" Mod by nickvergessen here? It is very difficult to give Support without any sorely needed Information. :(


Greets

Heinrich

Re: SQL Error

Posted: 29. July 2008 09:57
by Kevin
Hi,

yes - it has something to do with MSSQL - as we have a lag of testing environments we don't have much experience with it.

Please try the following:
open root\install_portal\install.php

search (around line 255):

Code: Select all

					case 'mssql':
						$sql = 'if exists (select * from sysobjects where name = ' . $table_prefix . 'portal_config)
						drop table ' . $table_prefix . 'portal_config';
						$result = $db->sql_query($sql);
						$db->sql_freeresult($result);
					break;
replace with:

Code: Select all

					case 'mssql':
						$sql = 'if exists (select * from sysobjects where name = ' . $table_prefix . 'portal_config')
						drop table ' . $table_prefix . 'portal_config';
						$result = $db->sql_query($sql);
						$db->sql_freeresult($result);
					break;
Save and upload


if the code above does not work, please try the following instead:

Code: Select all

					case 'mssql':
						$sql = 'IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME =  ' . $table_prefix . 'portal_config)
						drop table ' . $table_prefix . 'portal_config';
						$result = $db->sql_query($sql);
						$db->sql_freeresult($result);
					break;
Heinrich-XIV wrote:@Kevin: What do you think about of a intregation from the "Support Ticket System" Mod by nickvergessen here?
Yes, we can think about it.

Re: SQL Error

Posted: 29. July 2008 11:34
by SmauG
I tried both codes, but error remains :(

If it helps, this line

Code: Select all

El nombre de objeto 'phpbb_portal_config' no es v?lido.
means

Code: Select all

The name of the object 'phpbb_portal_config' is not valid

@Heinrich: I forgot to tell that i'm using mssql because i didn't thought that it could be a problem.

Re: SQL Error

Posted: 29. July 2008 11:47
by Kevin
Okay - as a quick fix - please try this:

find:

Code: Select all

                   case 'mssql':
                      $sql = 'if exists (select * from sysobjects where name = ' . $table_prefix . 'portal_config)
                      drop table ' . $table_prefix . 'portal_config';
                      $result = $db->sql_query($sql);
                      $db->sql_freeresult($result);
                   break;
replace with:

Code: Select all

                   case 'mssql':
                   break;
It's just for removing the portal table, if it's present from a installation before. As you don't have it installed before, the installer should work without this code.

Re: SQL Error

Posted: 29. July 2008 14:26
by SmauG
I know, i already tried this, but the error remains :S

I searched on all install.php (portal_install) and the line with this error doesn't exist (because i deleted it as you said), i deleted cache, i tried from another PC, and nothing, the error still happens, i think this have no sense.



Any ideas?

Re: SQL Error

Posted: 29. July 2008 14:32
by Kevin
Please post the complete error message, like you did in the first post.

Re: SQL Error

Posted: 29. July 2008 14:34
by SmauG
Is the same error, here's the code

Code: Select all

SQL ERROR [ mssql ]

El nombre de columna 'phpbb_portal_config' no es v?lido.
Invalid column name '%.*ls'. [207]

SQL

if exists (select * from sysobjects where name = phpbb_portal_config) drop table phpbb_portal_config

BACKTRACE

FILE: includes/db/mssql.php
LINE: 137
CALL: dbal->sql_error()

FILE: install_portal/install.php
LINE: 258
CALL: dbal_mssql->sql_query()
-------
-------
I also searched on
  • includes/db/mssql.php
  • install_portal/install.php
the lines with the error (dbal->sql_error() and dbal_mssql->sql_query() ) and nothing, doesn't exit.

I'm so lost at this moment.

Re: SQL Error

Posted: 29. July 2008 14:39
by Kevin
Looks definately to me like you haven't purged your (board - not browser!) cache after the changes - or forgot to upload the modified install.php
In this case please try from the beginning.

Re: SQL Error

Posted: 29. July 2008 14:51
by SmauG
First time i forgot to prune forum cache, but second time, when i installed a fresh forum, i did all ok.
I modified directly host archive. (I checked it three times, it's modified)

Re: SQL Error

Posted: 29. July 2008 15:00
by Kevin
If you have done this changes:
Kevin wrote:Okay - as a quick fix - please try this:

find:

Code: Select all

                   case 'mssql':
                      $sql = 'if exists (select * from sysobjects where name = ' . $table_prefix . 'portal_config)
                      drop table ' . $table_prefix . 'portal_config';
                      $result = $db->sql_query($sql);
                      $db->sql_freeresult($result);
                   break;
replace with:

Code: Select all

                   case 'mssql':
                   break;
then it's impossible that you get this error message:

Code: Select all

    SQL ERROR [ mssql ]

    El nombre de columna 'phpbb_portal_config' no es v?lido.
    Invalid column name '%.*ls'. [207]

    SQL

    if exists (select * from sysobjects where name = phpbb_portal_config) drop table phpbb_portal_config

    BACKTRACE

    FILE: includes/db/mssql.php
    LINE: 137
    CALL: dbal->sql_error()

    FILE: install_portal/install.php
    LINE: 258
    CALL: dbal_mssql->sql_query()
This error message comes definitely from the unmodified install.php
So there is something going wrong.
Have you tried downloading the install.php file and double checked that your changes are included then?

If you don't get further i could offer you to take a direct look on your forum - PM me the login data (FTP and Admin Account) i need.

Re: SQL Error

Posted: 29. July 2008 15:03
by SmauG
Forget it, magically now runs ok :shock:


Thanks for the help ^^