0

嗨,我正在使用 EZ publish,当我尝试访问我的网站时出现此错误。

 Unexpected error, the message was : Unable to connect to the database server 'localhost'
    Error #0:  in /var/www/lib/ezdb/classes/ezpostgresqldb.php on line 125

在我的

/var/www/settings/siteaccess/plain_site/site.ini.append.php
/var/www/settings/siteaccess/nor/site.ini.append.php
/var/www/settings/siteaccess/plain_site_admin/site.ini.append.php

我已经定义

[DatabaseSettings]
DatabaseImplementation=ezpostgresql
Server=localhost

服务器作为 localhost ,

我的数据库用户名和密码也正确

我的网站网址也是正确的

[SiteSettings]
SiteName=test
SiteURL=xxxxxxx/index.php

我的数据库服务器也正确启动

/etc/init.d/postgresql  restart

在我的网络浏览器中它只给出错误

An unexpected error has occurred. Please contact the webmaster.

所以

1.are there any log files  i should check ?
2.what are the possible reasons for this error , thank you very much
4

2 回答 2

1

我自己从未将 postgresql 与 eZ Publish 一起使用,但如果您确定您的设置正常,请尝试替换localhost127.0.0.1. 根据使用的 PHP 库,它可以提供帮助。

如果您正在寻找日志,请检查/path/to/ezp/var/log/*. 如果此目录为空,请确保您的网络服务器可以写入/path/to/ezp/var.

于 2014-08-07T17:27:35.270 回答
0

检查正在使用的用户名和密码 ( lib/ezdb/classes/ezpostgresqldb.php)。可能是您的 in 设置没有被读取。确保您已在覆盖 site.ini ( settings/override/site.ini) 中正确加载您的站点访问权限。听起来您的站点访问 ini 文件中排列了连接字符串,但您的站点访问没有被加载。

于 2014-08-07T13:59:41.913 回答