MS SQL SERVER 2008 Problems

Login or register to post comments
8 replies [Last post]
Offline
Joined: 05/06/2009

Hi, i'm starting to deploy an aplication with MS SQL SERVER 2008 database and i get errors that i don't know how to solve it. I've working with the Latest QCubed 1.1 and i get this error:

====================================================================================

Declaration of QSqlServerDatabase::SqlVariable() should be compatible with that of QDatabaseBase::SqlVariable()
Error Type: E_STRICT

Rendered Page: Click here to view contents able to be rendered

Source File: /var/www/TI-Viru/includes/qcubed/_core/database/QSqlServerDatabase.class.php Line: 45

====================================================================================

My configuration.inc.php has the follow information :

====================================================================================

define('DB_CONNECTION_1', serialize(array(
'adapter' => 'SqlServer2005',
'server' => 'svrdes01\develop2008',
'port' => null,
'database' => 'databasename',
'username' => 'sqlusername',
'password' => 'sqlpassword',
'profiling' => false)));

====================================================================================

I have to do something else?

I hope your feedback.

Offline
Joined: 05/06/2009

Sorry for this post, i just read the requirements for SqlServer2005DataBase class.
I'm using ubuntu karmic 9.10 and the adapter only works in Windows systems with Microsoft SQL Server 2008 Native Client installed

akrohn's picture
Offline
Joined: 11/14/2008

Yeah MS offers their new php sql_srv extension only for windows.

alex94040's picture
Offline
Joined: 11/06/2008

Can someone write a very simple patch for this adapter to fail gracefully on Linux, suggesting to use a different SQL server adapter?

Offline
Joined: 05/06/2009

Hi, i have configured qcubed in iis 6 (windows server 2003) to connect a ms sql server 2008 database and i get the same error with both adapters, 'SqlSever' and 'SqlServer2005'

ERROR : 'adapter' => 'SqlServer'
-----------------------------------------------------
Declaration of QSqlServerDatabase::SqlVariable() should be compatible with that of QDatabaseBase::SqlVariable()
-----------------------------------------------------

ERROR : 'adapter' => 'SqlServer2005'
-----------------------------------------------------
Declaration of QSqlServer2005Database::SqlVariable() should be compatible with that of QDatabaseBase::SqlVariable()
-----------------------------------------------------

So i acording to the error, i reviewed the methods and i note the follow :

QDatabaseBaseBase class
-----------------------------------------------------
public function SqlVariable($mixData, $blnIncludeEquality = false, $blnReverseEquality = false) {

QSqlServerDataBase class
-----------------------------------------------------
public function SqlVariable($mixData, $blnIncludeEquality = false) {

QSqlServer2005DataBase class
-----------------------------------------------------
public function SqlVariable($mixData, $blnIncludeEquality = false) {

So i try to add the $blnReverseEquality = false parameter to QSqlServerDataBase and QSqlServer2005DataBase class, and it works but only with SqlServer adapter and shows me the main page of the qcubed framework; but when i use SqlServer2005 dapater it only shows a blank page.

akrohn's picture
Offline
Joined: 11/14/2008

What PHP version do you use? Did you read und fulfill all the requirements for the SQLServer2005 Database adapter?

alex94040's picture
Offline
Joined: 11/06/2008

Folks, it looks like the issue is PHP 5.3-specific - the error messages around "method declarations have to be compatible with blah" have appeared before on PHP 5.3.

Akrohn, can you review all DB adapters for this issue?

akrohn's picture
Offline
Joined: 11/14/2008

Did look into it and could fix it. It was only related for SqlServer database adapters.

For a patch see here: http://trac.qcu.be/projects/qcubed/ticket/401

Cheers

alex94040's picture
Offline
Joined: 11/06/2008

akrohn - you're totally awesome. Thanks a bunch, man!