Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i went to update my website the other day on hostmonster but despite it working perfectly on development it had the error.

Fatal error: Call to undefined method mysqli_stmt::get_result()

researching the cause i found that my use of that syntax is found in the mysqlnd driver which the host doesn't have.

today my friend who manages the host (he manages a number of sites including mine with his account on host monster) gave me access, looking around i found that i could switch from php 5.2 (currently in use) to php 5.4 which according to mysql.com

As of PHP 5.4, the mysqlnd library is a php.net compile time default to all PHP MySQL extensions. Also, the php.net Windows team is using mysqlnd for the official PHP Windows distribution since mysqlnd became available in PHP 5.3.

however that didn't work, to make sure that the right version was running i used the following line of code

var_dump(function_exists('mysqli_stmt_get_result'), function_exists('mysqli_prepare'), function_exists('mysqli_stmt_fetch'),phpversion());

to which i got

bool(false) bool(true) bool(true) string(6) "5.4.27"

this seems to indicate that despite using php 5.4 i still don't have the mysqlnd driver. i am wondering what else i could look for to resolve this


  • the error is not any fault on me as before the problem line i use execute, if the variable i was called get_result from was incorrect it would have been picked up and i toughly tested in development for when there is a syntax error in a query or when no results are returned

  • i had to change back to PHP 5.2 as one of the sites my friend manages is a wordpress blog which is incompatible with 5.4. i have notified him of this

  • i want to avoid having to change the php code for my website as much as possible since it has taken me over a year to get everything ready

share|improve this question
Did you download the package off php.net? Because it can be that the package in your distribution was not compiled with mysqlnd. What OS are you running? –  edvinas.me May 15 '14 at 7:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.