Error while Installing freepbx on my Debian 12

I got below error while installation of Freepbx.

PHP Fatal error: Declaration of FreePBX\Database::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs): PDOStatement|false in /usr/src/freepbx/amp_conf/htdocs/admin/libraries/BMO/Database.class.php on line 240.

You need to update the method signature in FreePBX\Database::query() to match PDO::query(). The correct signature for PDO::query() is:
query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs): PDOStatement|false
So, you should modify the query() method in Database.class.php to look like this:
public function query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs): PDOStatement|false
{
// Your existing implementation
}
This ensures the method signature is compatible with the one from PDO::query()

But better way is to reinstall your debian 12.8 latest and rerun freepbx installation script as root user also insure that you system networking is working properly.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.