How to install php-pdo in centos7: 1. Install PHP and mariadb; 2. Execute the "yum install php-mysqlnd" command; 3. Execute "/bin/systemctl restart httpd".
The operating environment of this article: centos7 system, php5.4.16&&mariadb5.5.52 version, Dell G3 computer.
How to install php-pdo in centos7?
centos7 php(mariadb) install pdo
Install PDO in centos7 environment, during installation. I installed it separately, first installed PHP (httpd) and then installed mariadb.
After the database installation was completed, there was no pdo support. I followed the ordinary module installation method and went back and forth for several days. Baidu in China did not find a matching environment and various compilation errors occurred.
Finally found the answer on stackoverflow. Use yum install php-mysqlnd directly, and then /bin/systemctl restart httpd. There is pdo extension support in phpinfo.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to install php-pdo on centos7. For more information, please follow other related articles on the PHP Chinese website!