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

Since I moved my site to the new vServer, I always get this error message

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

These lines of code are working fine

 $mysql = new mysqli($db_host, $db_user, $db_password, $db_database); $partys = NULL; $res_partys = $mysql->query("SELECT * FROM party ORDER BY begin"); while($row_partys = $res_partys->fetch_array()) { $partys[] = $row_partys; } $count_reg = $mysql->prepare("SELECT COUNT(*) FROM guestlist WHERE partyid = ?"); $count_reg->bind_param('i', $party['partyid']); $count_reg->execute(); 

but $count_res = $count_reg->get_result(); fails. Mysqli support is included.

Checking with some Internet sources I need native PHP MySQL drivers, but only php5-mysql is installed on my Debian 7 computer, since installing php5-mysqlnd via apt-get install php5-mysqlnd will automatically remove Froxlor, which is my control panel server.

Are there other ways to install mysqlnd other than downloading it via apt-get download php5-mysqlnd and installing it with dpkg, as this will cause errors on every next apt-get call due to unmet requirements and compiling PHP, including mysqlnd from source?

+6
source share
2 answers

I managed to install php5-mysqlnd without uninstalling Froxlor.

Froxlor has a dependency on php5-mysql , which is removed by installing php5-mysqlnd , but is also compatible with mysqlnd.

So I had to download the package via apt-get download php5-mysqlnd and install it with dpkg -i --ignore-depends=froxlor php5-mysqlnd_5.4.4-14+deb7u7_amd64.deb

+5
source

There are no mysql (mysqlnd) drivers on your server.

Install this extension on your server to use the result result function.

0
source

All Articles