0

Basically, I have noticed other people have had a similar issue but they haven't had Mysqlnd installed.

Yet i still get this error: Fatal error: Call to undefined method mysqli_stmt::get_result() in...

Yet I have the necessary drivers installed and it works beautifully on my local host.

enter image description here

Anybody know what the issue is? I'm using 1and1 webhosting with Linux.

Barmar
  • 741,623
  • 53
  • 500
  • 612
mdixon18
  • 1,199
  • 4
  • 14
  • 35

1 Answers1

0

Having the same issue at the moment.

Is mysqlnd installed or is it not installed, that is the question.

Notice under "API EXTENSIONS" in your screenshot (last entry) it only lists PDO_mysql. It should also list mysql,mysqli, like it does on my server where it works.

BUT... is that the problem? I'm trying to get mysqli to run on a seperate server with WHM/cpanel, and after following all 'standard' setup steps i'm left with the question of whether mysqlnd is installed or not.

Doing a class_exists() check confirms the "mysqli" is now available. So it must be installed, just like phpinfo() says, no?

Well... yes and no. You can now connect to the database with the mysqli connector and you can prepare statements, and you can execute normal mysql functions, but NOT mysqli ones... like get_result()

Doing a class_exists() check on "mysqli_stmt" confirms the class exists (yay, its installed??)... but when you list the methods of the class get_class_methods('mysqli_stmt') you will strangely find that all normal mysqli methods like get_result() are NOT available. According to php.net they SHOULD be there.

So whats the problem and how to fix it?

I wish i knew.

My solution for now: Rewrite the statements in PDO style. :-(

Matt
  • 278
  • 3
  • 12