本文介绍了致命错误:调用未定义的方法mysqli_stmt :: get_result()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我已经将我的站点移至新的vServer,所以我总是收到此错误消息

Since i've moved a site of mine to a new vServer, I always get this error message

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

这些代码行工作正常

$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();

,但$count_res = $count_reg->get_result();失败. Mysqli支持已启用.

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

根据一些互联网资源,我需要PHP MySQL本机驱动程序,但我仅在我的Debian 7计算机上安装了php5-mysql,因为通过apt-get install php5-mysqlnd安装php5-mysqlnd会自动删除Froxlor,这是我的服务器管理面板.

Accorind to some internet sources I need the PHP MySQL native drivers, but I've only got php5-mysql installed on my Debian 7 machine, as installing php5-mysqlnd via apt-get install php5-mysqlnd would automatically remove Froxlor, which is my server management panel.

除了通过apt-get download php5-mysqlnd下载并使用dpkg安装mysqlnd以外,还有其他方法可以安装mysqlnd吗,因为由于未满足要求,这将在随后的每个apt-get调用中引发错误,并从源代码编译包括mysqlnd的PHP吗? >

Are there other ways to install mysqlnd except downloading it via apt-get download php5-mysqlnd and installing it using dpkg, as this would throw errors on each following apt-get call due to unmet requirements, and compiling PHP including mysqlnd from source?

推荐答案

我已经成功安装了php5-mysqlnd而没有删除Froxlor.

I've managed installing php5-mysqlnd without removing Froxlor.

Froxlor对php5-mysql有依赖性,可以通过安装php5-mysqlnd来删除,但也与mysqlnd兼容.

Froxlor has an dependecy on php5-mysql, which is removed by installing php5-mysqlnd, but is also compatible to mysqlnd.

所以我不得不通过apt-get download php5-mysqlnd下载该软件包并使用dpkg -i --ignore-depends=froxlor php5-mysqlnd_5.4.4-14+deb7u7_amd64.deb

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

这篇关于致命错误:调用未定义的方法mysqli_stmt :: get_result()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-30 11:04