How to enable mysqlnd for php?

前端 未结 6 560
失恋的感觉
失恋的感觉 2020-11-27 05:17

I have PHP installed and running (version: 5.3.17) and I want to switch to mysqlnd (in the phpinfo mysqlnd does not exist at all).

I read that in order to set it, yo

6条回答
  •  难免孤独
    2020-11-27 05:39

    I may be late with this but it could be of help to others. As already said elsewhere in the forum, if a call to a function like get_result complains that it is undefined, then php-mysqlnd need to be installed (this question). I realized that doing yum install (centos) will automatically reports that it wants to remove php-mysql and phpmyadmin; do not accept this as your phpmyadmin may not work after. Instead, use yum shell which will take the commands at once and gracefully handle the change over; do these in command line:

    # yum shell
    > remove  php-mysql
    > install php-mysqlnd
    > run
    > quit
    

    Now you may have to restart both the mariadb (most likely) and the httpd services.

提交回复
热议问题