This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Unexpected error, the message was :...
expandshrink

Unexpected error, the message was : Unable to connect to the database server 'localhost' EZ Publish

Unexpected error, the message was : Unable to connect to the database server 'localhost' EZ Publish

Thursday 07 August 2014 12:44:50 pm - 1 reply

Hi i am using EZ publish , when i try to access my site i am getting this error .

<span class="pln"> </span><span class="typ">Unexpected</span><span class="pln"> error</span><span class="pun">,</span><span class="pln"> the message was </span><span class="pun">:</span><span class="pln"> </span><span class="typ">Unable</span><span class="pln"> to connect to the database server </span><span class="str">'localhost'</span><span class="pln">    </span><span class="typ">Error</span><span class="pln"> </span><span class="com">#0:  in /var/www/lib/ezdb/classes/ezpostgresqldb.php on line 125</span>

in my

<span class="str">/var/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">settings</span><span class="pun">/</span><span class="pln">siteaccess</span><span class="pun">/</span><span class="pln">plain_site</span><span class="pun">/</span><span class="pln">site</span><span class="pun">.</span><span class="pln">ini</span><span class="pun">.</span><span class="pln">append</span><span class="pun">.</span><span class="pln">php</span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">settings</span><span class="pun">/</span><span class="pln">siteaccess</span><span class="pun">/</span><span class="pln">nor</span><span class="pun">/</span><span class="pln">site</span><span class="pun">.</span><span class="pln">ini</span><span class="pun">.</span><span class="pln">append</span><span class="pun">.</span><span class="pln">php</span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">settings</span><span class="pun">/</span><span class="pln">siteaccess</span><span class="pun">/</span><span class="pln">plain_site_admin</span><span class="pun">/</span><span class="pln">site</span><span class="pun">.</span><span class="pln">ini</span><span class="pun">.</span><span class="pln">append</span><span class="pun">.</span><span class="pln">php</span>

i have defined

<span class="pun">[</span><span class="typ">DatabaseSettings</span><span class="pun">]</span><span class="pln"></span><span class="typ">DatabaseImplementation</span><span class="pun">=</span><span class="pln">ezpostgresql</span><span class="typ">Server</span><span class="pun">=</span><span class="pln">localhost</span>

 

server as localhost ,

also my database user name and passwords are correct

also my site url is correct

 

<span class="pun">[</span><span class="typ">SiteSettings</span><span class="pun">]</span><span class="pln"></span><span class="typ">SiteName</span><span class="pun">=</span><span class="pln">test</span><span class="typ">SiteURL</span><span class="pun">=</span><span class="pln">xxxxxxx</span><span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln">php</span>

 

also my database server is starts correctly

<span class="str">/etc/</span><span class="pln">init</span><span class="pun">.</span><span class="pln">d</span><span class="pun">/</span><span class="pln">postgresql  restart</span>

in my web browser it only gives the error

<span class="typ">An</span><span class="pln"> unexpected error has occurred</span><span class="pun">.</span><span class="pln"> </span><span class="typ">Please</span><span class="pln"> contact the webmaster</span><span class="pun">.</span>

so

<span class="lit">1.are</span><span class="pln"> there any log files  i should check </span><span class="pun">?</span><span class="pln"></span><span class="lit">2.what</span><span class="pln"> are the possible reasons </span><span class="kwd">for</span><span class="pln"> </span><span class="kwd">this</span><span class="pln"> error </span><span class="pun">,</span><span class="pln"> thank you very much</span>

Friday 08 August 2014 10:46:28 am

check if the db settings are changed in settings/override/site.ini.append.php, which has precedence over the file in the siteaccess settings

ez logs are in $ezfolder/var/log

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from