PostgreSQL 和 XAMPP 之间的错误连接

Error connect between PostgreSQL and XAMPP

有人可以帮我解决有关将 PostgreSQL 与 XAMPP 连接的问题吗?

错误是:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Misc has a deprecated constructor in C:\xampp\phpPgAdmin\classes\Misc.php on line 8

我使用 PostgreSQL 版本 9.6.2-3 和 XAMPP 7.1.1.0

该(通知)消息基于对 PHP 7.

的更改

因此,使用构造函数的旧方法仍在使用,这就是该消息的含义。暂时没问题,等以后完全去掉这个支持。但是,我不认为 should/would 会导致任何连接问题?

预期的是 class 和这样的构造函数:

<?php
    class foo {
        function foo() {
            echo 'I am the constructor';
        }
    }
?>

...现在应该看起来像这样:

<?php
    class foo {
        function __construct() {
            echo 'I am the constructor';
        }
    }
?>

请参阅此 PHP 7 deprecation 信息的第一部分。

您可以自己应用该更改,只需注释掉旧方法,然后使用其他构造函数形式。