How to enable mysqli API extension for mysqlnd?


I updated my website scripts to use mysqli prepared statements. They worked well on my localhost but when I uploaded the files to my website, it gave “PHP Fatal error: Call to undefined method mysqli_stmt::get_result()” error. I learned that mysqli prepared statements require mysqli to be enabled as API extension for mysqlnd (not sure if I’m describing it correctly). Checked php_info() and noticed it was not enabled on my hosting server.

I contacted my hosting support to enable it but I wanted to ask here too while waiting in case their reply takes long.

On my server there is a PHP extension settings page as follows:

My guess was to enable nd_mysqli (not sure if it is what I need), but when I checked it and tried to save it gave the error “nd_mysqli skipped as conflicting”.

Do you have any ideas how I can enable mysqli API extension for mysqlnd so that my prepared statements will work?


Just a guess. Try to untick mysqli while ticking nd

1 Like

I did as you suggested and it worked, thank you. Just to be perfectly sure it is the correct way of doing it, I will wait to hear from the hosting support and update this post in case anyone else has the same issue in the future.

EDIT: I heard back from my hosting support and they confirmed that unchecking mysqli and checking nd_mysqli is the right way to go.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.