interconnectit / Search-Replace-DB

This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
GNU General Public License v3.0
3.99k stars 850 forks source link

Could not find any MySQL database drivers. (MySQLi or PDO required.) #353

Closed josip-matic closed 3 years ago

josip-matic commented 3 years ago

Great tool, I use it a lot! On CLI I getting issue, but everything is installed.

php info:

PDO support enabled
PDO drivers mysql
MysqlI Support enabled
Client API library version mysqlnd 7.4.15
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Directive Local Value Master Value
mysqli.allow_local_infile Off Off
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
mysqli.rollback_on_cached_plink Off Off
gianluigi-icit commented 3 years ago

Hello, do you receive any error from the tool?

josip-matic commented 3 years ago

Hi, here is command (real data are changed): START;

_php srdb.cli.php -h localhost -n DB -u USERDB -p "PASSWORDDB" -s "https://DOMENA_OLD" -r "http://DOMENA_NEW"_ db: Could not find any MySQL database drivers. (MySQLi or PDO required.)

And we're done!

:END Best regards

gianluigi-icit commented 3 years ago

mmm this is a problem on your server, you might have mysql extension loaded on php-fpm but disabled in cli, could you check your php.ini files?

josip-matic commented 3 years ago

I am not server master but here is one example of our subdomain how it looks. Can you please check my php.ini https://bit.ly/30E44fj we usually have 20 or more domains at development server.

gianluigi-icit commented 3 years ago

well, you should contact your server admin in this case. I can see something might be missing, hope they will fix the problem!

josip-matic commented 3 years ago

Problem solved, server administration said: different PHP version at Web server and on CLI, when they are the same everything work fine. Thanks!