Bug #51458

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

Added by Georg Bez almost 2 years ago. Updated about 1 month ago.

Status:Closed Start date:2013-08-28
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:DBAL Spent time: -
Target version:-
TYPO3 Version:6.1 Is Regression:No
PHP Version:5.3 Sprint Focus:
Complexity:medium

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 Core - Bug #50752: DBAL needs migration MySQL to MySQLi as well Resolved 2013-08-03
duplicated by Core - Bug #56291: Fatal error: Call to a member function query() on a non-o... Closed 2014-02-25

History

#1 Updated by Jochen Wirth almost 2 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 2 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 over 1 year ago

  • Project changed from DBAL to Core

#4 Updated by Michael Stucki over 1 year ago

  • Category set to DBAL

#5 Updated by Oliver Hader over 1 year 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 1 year ago

DBAL migration to mysqli in #50752.

#7 Updated by Andreas Fernandez 6 months ago

  • Status changed from Accepted to Needs Feedback

Is this issue still present in 6.2?

#8 Updated by Alexander Opitz about 1 month 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