Dear Community,
In my code i used both mysqli and fetch_all function that also requires mysqlnd.
everything worked fine on my local WAMP server
now in godaddy cpanel linux hosting i ticked both mysqli and mysqlnd in the Php version link of Software section.
however php still returns an error: Call to undefined method mysqli_result::fetch_all() , as if mysqlnd was not activated.
how can i make both these extensions work
Thanks
Solved! Go to Solution.
Ok, I figured it out for my case at least.
Steps:
1) Go to CPanel dashboard
2) Go to 'Select PHP Version', you should see a bunch of checkboxes
3) Set PHP version (min 5.4)
4) Uncheck the 'mysqli' extension and check both 'mysqlind' and 'nd_mysqli'
Apparently 'nd_mysqli' is 'mysqli' but configured to work with 'mysqlind' and to make it work you have to uncheck 'mysqli' due to settings conflicts.
This information was hidden deep within a stackoverflow answer that I can no longer find. Hope this helps some other people.
Hi @Gizat. Welcome to GoDaddy Community! I'm not a PHP developer, so I'm not sure this will help. I did find this Stack Overflow post discussing the same error. I'd also suggest using a PHP information script to make sure mysqlnd is working as intended.
I'm having a similar issue. I have php v7.2 and both the mysqli and mysqlnd boxes checked but it still doesn't recognize mysqli_stmt::get_result().
@Gizat Were you able to figure out how to get mysqlnd working?
Hi @metamilo. Thanks for posting. It's hard to say for sure what's happening in your case. I'd suggest adding additional information about the error you're receiving. That may help others offer suggestions on how you can move forward.
Ok, I figured it out for my case at least.
Steps:
1) Go to CPanel dashboard
2) Go to 'Select PHP Version', you should see a bunch of checkboxes
3) Set PHP version (min 5.4)
4) Uncheck the 'mysqli' extension and check both 'mysqlind' and 'nd_mysqli'
Apparently 'nd_mysqli' is 'mysqli' but configured to work with 'mysqlind' and to make it work you have to uncheck 'mysqli' due to settings conflicts.
This information was hidden deep within a stackoverflow answer that I can no longer find. Hope this helps some other people.