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

走远了吗. 提交于 2019-11-26 14:52:12

问题


i'm working to a web app, and PHP is my backend language...

until now, i tested the website on localhost, using easyPHP (PHP version 5.4.6)... and everything was good! Today i tried to run the website online (PHP version 5.3.18), and i've this error:

Fatal error: Call to undefined method mysqli_stmt::get_result() in etc.

I think this is strange, because the get_result() method should be supported since PHP 5.3.0 (source)

Do you have any ideas how to solve this problem?

Thank you in advance

UPDATE:

i didn't share any code because it is just fine (it still works on my localhost)... the problem should be on the online environment.

UPDATE 2: I share the section of the phpInfo with the info about mysqli...

Localhost:

Remote:


回答1:


I've found the problem.

From php.net:

mysqli_stmt :: get_result is Available only with mysqlnd.

My online environment, unlike my local environment seems to be lacking of mysqlnd!

So I guess I've to contact my host.




回答2:


Just had the same issue, and I didn't have much faith that my hosting provider would enable mysqlnd anytime soon. So ended up switching out mysqli_stmt::get_result()

Check if this solution works for you



来源:https://stackoverflow.com/questions/13659856/fatal-error-call-to-undefined-method-mysqli-stmtget-result

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!