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

Errors on PHP 8.1 #377

Closed phaleth closed 11 months ago

phaleth commented 2 years ago

Getting the following errors on PHP 8.1.

[php:error] [pid 24] [client 172.19.0.1:48538] PHP Fatal error:  Uncaught mysqli_sql_exception: No such file or directory in /var/www/html/dbtool/srdb.class.php:523\nStack trace:\n#0 /var/www/html/dbtool/srdb.class.php(523): mysqli_real_connect(Object(mysqli), NULL, NULL, NULL, NULL, NULL)\n#1 /var/www/html/dbtool/srdb.class.php(475): icit_srdb->connect_mysqli()\n#2 /var/www/html/dbtool/srdb.class.php(461): icit_srdb->connect('mysqli')\n#3 /var/www/html/dbtool/index.php(318): icit_srdb->db_setup()\n#4 /var/www/html/dbtool/index.php(89): icit_srdb_ui->response()\n#5 /var/www/html/dbtool/index.php(5477): icit_srdb_ui->__construct()\n#6 {main}\n  thrown in /var/www/html/dbtool/srdb.class.php on line 523
[php:error] [pid 24] [client 172.19.0.1:48538] PHP Fatal error:  Uncaught mysqli_sql_exception: No such file or directory in /var/www/html/dbtool/srdb.class.php:523\nStack trace:\n#0 /var/www/html/dbtool/srdb.class.php(523): mysqli_real_connect(Object(mysqli), NULL, NULL, NULL, NULL, NULL)\n#1 /var/www/html/dbtool/srdb.class.php(475): icit_srdb->connect_mysqli()\n#2 /var/www/html/dbtool/srdb.class.php(461): icit_srdb->connect('mysqli')\n#3 /var/www/html/dbtool/index.php(318): icit_srdb->db_setup()\n#4 /var/www/html/dbtool/index.php(385): icit_srdb_ui->response()\n#5 [internal function]: icit_srdb_ui->fatal_handler()\n#6 {main}\n  thrown in /var/www/html/dbtool/srdb.class.php on line 523
"GET /dbtool/ HTTP/1.1" 500 210 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36"

On PHP 7.4 Search-Replace-DB works as expected.

infoberg commented 2 years ago

running into the same issue. any plans to fix this error?

aiac commented 2 years ago

same here, on PHP 8.0.21, mysqli extension enabled

rupert-quaderer commented 1 year ago

Same here

AstralInternet commented 1 year ago

You need to have the MySQL PDO library installed for the code to work on PHP 8.1.

rupert-quaderer commented 1 year ago

You need to have the MySQL PDO library installed for the code to work on PHP 8.1.

Works perfect for me. If anyone works with docker, add this to your dockerfile.RUN docker-php-ext-install pdo pdo_mysql

phaleth commented 11 months ago

@AstralInternet thank you, that resolves the issue.