没有 mysqli_stmt_get_result() 和 mysqlnd

2021-12-25 00:00:00 php mysqli mysqlnd

我准备好的语句在带有 PHP 5.4 的 MAMP 中工作得很好,无需调整 php.ini.在我的 GoDaddy 网站上,相同的代码失败:

My prepared statements work just fine in MAMP with PHP 5.4 and no need to tweak php.ini. On my GoDaddy site, the same code fails with:

致命错误:调用未定义的函数mysqli_stmt_get_result().

Fatal error: Call to undefined function mysqli_stmt_get_result().

我的 GoDaddy info.php 显示以下内容已启用:

My GoDaddy info.php shows the following as enabled:

mysqli 客户端 API 库版本 5.5.45

mysqli Client API library version 5.5.45

mysqlnd:mysqlnd 5.0.10
加载的插件:mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API 扩展:无

mysqlnd: mysqlnd 5.0.10
Loadedplugins:mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions: none

GoDaddy 说他们的 PHP 工作得很好,虽然我怀疑他们测试过这个功能.他们声称这一定是代码错误,这让我觉得与错误的性质和代码在 MAMP 中工作的事实不一致.

GoDaddy says their PHP is working just fine, although I doubt they tested for this function. They claim it must be a code error, which strikes me as inconsistent with both, the nature of the error and the fact the code works in MAMP.

我的下一步是什么?

推荐答案

在 php 扩展中启用 nd_mysqli 并禁用 mysqli

Enable nd_mysqli in php extensions and disable mysqli

相关文章