Bug #51458
closed
Fatal error: function query() DatabaseConnection.php on line 986
Added by Georg Bez about 11 years ago.
Updated over 9 years ago.
Category:
Database API (Doctrine DBAL)
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! :-)
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
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
- Project changed from 329 to TYPO3 Core
- 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
DBAL migration to mysqli in #50752.
- Status changed from Accepted to Needs Feedback
Is this issue still present in 6.2?
- 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