SQL Error

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Locked

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

SQL Error

Post 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()
User avatar

Heinrich-XIV
Tester
Posts: 233
Joined: 16. May 2008 18:39
phpBB.de User: Heinze 1906
phpBB.com User: Heinrich-XIV
Location: 52353 Düren

Re: SQL Error

Post 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
No more Heroes -=- The Stranglers

Beat the Bastards -=- The Exploited
[/size]

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

Re: SQL Error

Post 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
User avatar

Heinrich-XIV
Tester
Posts: 233
Joined: 16. May 2008 18:39
phpBB.de User: Heinze 1906
phpBB.com User: Heinrich-XIV
Location: 52353 Düren

Re: SQL Error

Post 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
No more Heroes -=- The Stranglers

Beat the Bastards -=- The Exploited
[/size]
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL Error

Post 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.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

Re: SQL Error

Post 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.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL Error

Post 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.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

Re: SQL Error

Post 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?
Last edited by SmauG on 29. July 2008 14:34, edited 2 times in total.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL Error

Post by Kevin »

Please post the complete error message, like you did in the first post.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

Re: SQL Error

Post 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.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL Error

Post 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.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

Re: SQL Error

Post 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)
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL Error

Post 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.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
SmauG
Active Member
Posts: 7
Joined: 28. July 2008 22:12

Re: SQL Error

Post by SmauG »

Forget it, magically now runs ok :shock:


Thanks for the help ^^
Locked

Return to “board3 Portal 1.0.x - English Support”