interconnectit/Search-Replace-DB

Errors on PHP 8.1

phaleth opened this issue ยท 6 comments

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.

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

aiac commented

same here, on PHP 8.0.21, mysqli extension enabled

Same here

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

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

@AstralInternet thank you, that resolves the issue.