Bug #51458

Fatal error: function query() DatabaseConnection.php on line 986

Added by Georg Bez about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2013-08-28
Due date:
% Done:

0%

TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Hi,
I have created a test environment in preparation for the changeover to the new version of Typo3 v6.1.3
The old Typo3 version was 4.7.x.

When I go to the Extension manager and actived DBAL I get the following error message:
Fatal error: Call to a member function query() on a non-object in typo3_src-6.1.3/typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 986

Please help me! :-)


Related issues

Related to TYPO3 Core - Bug #50752: DBAL needs migration MySQL to MySQLi as well Closed 2013-08-03
Duplicated by TYPO3 Core - Bug #56291: Fatal error: Call to a member function query() on a non-object Closed 2014-02-25

History

#1 Updated by Jochen Wirth about 6 years ago

I had see same problem. One updated system (4.7 -> 6.1.3)
error: Fatal error: Call to a member function query() on a non-object in typo3_src-6.1.3/typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 986

Second system working perfect after update. I checked the difference of both systems:

LocalConfiguration:

Working system: 'dbal' => 'a:1:{s:10:"sql_query.";a:1:{s:11:"passthrough";s:1:"0";}}',
broken system: 'dbal' => 'a:2:{s:10:"sql_query.";a:1:{s:11:"passthrough";s:1:"1";}s:13:"Compatibility";s:0:"";}',

Changing the LocalConfiguration worked for me! Don't know why the flag was set.

Maybe it's your solution (I hope so)

Joe

#2 Updated by Alexander Stehlik almost 6 years ago

This is indeed a bug because newer TYPO3 versions are using the object orientated mysqli functions and dbal is using the old mysql functions. This can not fit together.

I see these options:

  • remove the passthrough setting completely
  • replace the call to the parent sql_query function with a mysql function call
  • replace mysql with mysqli in dbal

#3 Updated by Michael Stucki almost 6 years ago

  • Project changed from DBAL to TYPO3 Core

#4 Updated by Michael Stucki almost 6 years ago

  • Category set to 999

#5 Updated by Oliver Hader over 5 years ago

  • Status changed from New to Accepted
  • PHP Version set to 5.3
  • Complexity set to medium
  • Is Regression set to No

Issue can be reproduces in 6.1 and current master

#6 Updated by Markus Klein over 5 years ago

DBAL migration to mysqli in #50752.

#7 Updated by Andreas Fernandez over 4 years ago

  • Status changed from Accepted to Needs Feedback

Is this issue still present in 6.2?

#8 Updated by Alexander Opitz about 4 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Also available in: Atom PDF