i设置bitnami postgressql和php
phpinfo加载没有问题,但是phpinfo的postgres部分很好但是,如果您试图访问数据库,就会发生错误。
<?php
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
}
set_error_handler("exception_error_handler");
try {$conn=@pg_connect("host=localhost dbname=Test user=postgres password=1234");
}
Catch (Exception $e) {
Echo $e->getMessage();
}
?>
pg_connect(): Unable to connect to PostgreSQL server: ġ������: "Test" �����ͺ��̽� ����
我使用的是postgressql10,12和最新版本的phpApache,
但我无法连接每一个,所以我删除了所有现有的,并安装了bitnami的postgres 11.4版本,该版本保证可以连接,然后重新安装了pgadmin4。它似乎与11.4没有关联。
我不知道是不是因为这个原因,但当我试图在pgadmin中找到表时,它一直给我一个错误,说没有关系
我正在寻找解决这些问题的办法。
你能告诉我如何正确安装postgres-php-aphachi吗?
这是"错误ZWSP错误
������: "测试";�����ͺ��̽� ����是ZWSP哈哈