Page 1 of 1

Undefined variable: sql

Posted: Thu 14. Jul 2011, 12:46
by mauricio
Hello,

Look what I'm getting when I try to run the install directory:
[phpBB Debug] PHP Notice: in file /install/index.php on line 134: Undefined variable: sql

Any ideas?

Im on PhpBB 3.0.8

Re: Undefined variable: sql

Posted: Fri 22. Jul 2011, 17:18
by Marc
What kind of database and which version are you using?

Re: Undefined variable: sql

Posted: Fri 22. Jul 2011, 17:43
by mauricio
DB: sql server 2008R2
PhpBB: 3.0.8

Re: Undefined variable: sql

Posted: Sun 28. Aug 2011, 10:52
by Marc
Sorry for the late reply. I'm currently not able to test phpBB Statistics on an SQL Server. I'll try to test it before releasing the next version. Sorry about that.

I think that your are using mssqlnative. You can try to fix it by searching for every instance of this in the install files:

Code: Select all

				case 'mssql':
				case 'mssql_odbc':
And replace it with this:

Code: Select all

				case 'mssql':
				case 'mssql_odbc':
				case 'mssqlnative':

Re: Undefined variable: sql

Posted: Mon 5. Sep 2011, 20:35
by mauricio
Erro Geral
SQL ERROR [ mssqlnative ]

SQLSTATE: 42000 code: 156 message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword 'IF'. [156]

SQL

DROP TABLE IF EXISTS myforumstats_config

BACKTRACE


FILE: includes/db/mssqlnative.php
LINE: 313
CALL: dbal->sql_error()

FILE: install/install_functions.php
LINE: 170
CALL: dbal_mssqlnative->sql_query()

FILE: install/install_functions.php
LINE: 129
CALL: stats_drop_table()

FILE: install/install_install.php
LINE: 115
CALL: stats_create_table()

FILE: install/install_install.php
LINE: 73
CALL: install_install->load_schema()

FILE: install/index.php
LINE: 256
CALL: install_install->main()

FILE: install/index.php
LINE: 56
CALL: module->load()