For the first time, I attempted to install the nightly build of J4.
Tab 1: Configuration:
I called it 'J4 Test Site' and gave it a short description.
I filled in my email, SU username and password (x2)
No problems and I could proceed to Tab 2.
Tab 2: Database:
I left it at MySQLi and localhost, which is correct for my server.
I gave it my usual database credentials and a reasonably named table-prefix.
Proceed to Tab 3: Overview
I cannot go further, as I get the following error:
Call to undefined method mysqli_stmt::get_result()
PHP Built On Linux gator4177.hostgator.com 3.12.65-188.ELK6.x86_64 #1 SMP Thu Oct 20 23:27:48 CDT 2016 x86_64
Database Version 5.5.51-38.2
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.0.18
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.7.2 Stable [ Amani ] 22-May-2017 09:46 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
I have Joomla 3.7.2 sites running on the same server with the same server setup, with no issues.
Labels |
Added:
?
|
Category | ⇒ | com_installer |
Title |
|
Title |
|
https://stackoverflow.com/questions/8321096/call-to-undefined-method-mysqli-stmtget-result
Long and short is some of the stuff we're doing requires PHP to use the mysqlnd
engine under the hood. We're going to have to make some checks to work around that it seems.
Title |
|
Title |
|
Can't confirm.
4.0.0-dev / nightly Build
macOS Sierra, 10.12.5
Firefox 54 (64-bit)
You probably have the mysqlnd
engine enabled on your platform. When you go to /administrator/index.php?option=com_admin&view=sysinfo
, on the PHP Information tab, search for mysqlnd
. If it's enabled it'll have its own heading in the output, not quite sure what you'd see in a phpinfo()
output if it's disabled.
Status | New | ⇒ | Discussion |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-26 09:36:37 |
Closed_By | ⇒ | tarotray |
My apologies to everyone who looked into this issue. I took a really good look at things, today (first time that I've had enough time available) and discovered an error when I created the db access rights.
Now that I've fixed the error, the problem has gone away, so I shall close this issue.
Status | Closed | ⇒ | New |
Closed_Date | 2017-06-26 09:36:37 | ⇒ | |
Closed_By | tarotray | ⇒ |
I'm re-opening as you could still reproduce it according to our skype tonight
Status | New | ⇒ | Discussion |
It's true. I did get further but I still get the same error message.
Just to circle back around on this, George and I were talking about this a little bit over the weekend too.
One of the things we looked at was how Doctine handles this. First, keep in mind that it's primarily a PDO based API so their MySQLi support is kind of tacked onto that and still has a lot of "PDO-ism's" littered into their code. As far as handling things goes in our database API, we're about functionally similar all the way up to what we do after the query is actually executed. Specifically, it's this line that the behaviors start differing at (the line that's producing the undefined method error).
Doctrine uses a behavior of manually binding the result data instead of processing a result cursor, this is also a generally accepted workaround to requiring mysqlnd
. The relevant code is at https://github.com/doctrine/dbal/blob/899c62bb579027c146b73f6b580c871eb669d310/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php#L175-L217 but generally it is fetching the selected column names out of the mysqli_stmt
object to create an array of columns to bind to, then builds a references array with the pertinent data, then calls mysqli_stmt::bind_result
with the references. This handles getting the data in a usable form for the most part.
So back to the point about processing a result cursor. Without the cursor, you have to manually build a result set. In Doctrine, that's fetching the results from mysqli_stmt
and building a result array, and then they use some PHP logic to build the appropriate return sets for the requested fetch type (relevant functions are at https://github.com/doctrine/dbal/blob/899c62bb579027c146b73f6b580c871eb669d310/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php#L244-L311). Our internal fetch*
methods would have to be refactored to emulate this logic and no longer use a result cursor and the mysqli
API to fetch the data.
So sorry, but a lot of that explanation goes over my head.
If it's any help, as it just simply doesn't create the database, on installation, I just reconstructed the database, on my host server, by running the SQL in /installation/sql/mysql/joomla.sql and I got this result:
Error displaying the error page: Failed to start the session: already started by PHP.: Call to undefined method mysqli_stmt::get_result()
Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::get_result() in /home4/tarotray/public_html/j4-dev/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:716 Stack trace: #0 /home4/tarotray/public_html/j4-dev/libraries/vendor/joomla/database/src/DatabaseDriver.php(1156): Joomla\Database\Mysqli\MysqliDriver->execute() #1 /home4/tarotray/public_html/j4-dev/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php(276): Joomla\Database\DatabaseDriver->loadResult() #2 [internal function]: Joomla\Session\Handler\DatabaseHandler->write('n8c8ddk6lc98ag8...', 'joomla|s:160:"T...') #3 /home4/tarotray/public_html/j4-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php(108): session_write_close() #4 /home4/tarotray/public_html/j4-dev/libraries/src/CMS/Session/Storage/JoomlaStorage.php(127): Joomla\Session\Storage\NativeStorage->close() #5 [internal function]: Joomla\CMS\Session\Storage\JoomlaStorage->close() #6 {main} thrown in /home4/tarotray/public_html/j4-dev/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 716
My next test will be to delete the db, again, put all the latest build, into the directory and try to install again. I suspect I shall get the same result as before.
I'll let you know.
BTW: @wilsonge I seem to remember that I did, already, try using MySql (PDO) instead of MySQLi, some days ago without success.
So sorry, but a lot of that explanation goes over my head.
It's just notes for us to come back to, nothing that has to be acted on by you.
FYI: The problem has been fixed, if I use the mySQL PDO setting. Thanks, team.
Labels |
Added:
J4 Issue
|
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-03-29 14:22:45 |
Closed_By | ⇒ | mbabker |
Disable mysqli extension and enable nd_mysqli extension, works like a charm
Might be something to do with the database framework package? @mbabker