It is currently Tue Sep 26, 2017 1:17 am

All times are UTC [ DST ]




 Page 1 of 1 [ 2 posts ] 
Author Message
 Post subject: The database is currently unavailable (R)
PostPosted: Sat Nov 07, 2009 2:38 pm 
User avatar

Joined: Sat Jul 15, 2006 4:55 pm
Posts: 32
Location: /root
Well, first of all...a few details. GnuWorld was installed on Slackware 10.2, using tcl 8.4 and postgresql 8.1.7. I used the evilnet tutorial and everything installed just fine. I did encounter one error when GnuWorld was started, but it was solved by replacing in the .conf files for the modules the DB address from "127.0.0.1" to "localhost". And then everything came online just fine, no DB errors...

Then I went on with installing apache, php and the other software. Everything went fine. I started apache after doing the necessary edits and so on, and the website shows that error. The error isn't intermittent or something, it's there all the time, for every user that logs on.

I did a search here and found a topic that said to replace "127.0.0.1" in cmaster.inc with "localhost" but that didn't work.

I do notice that the error is about "remote_db" and I modified both local_db addresess and remote_db, both "localhost" and "127.0.0.1" and still the same result.

Every port forward was done perfectly so it's not a port problem. The db is on the same server as gnuworld and I started gnuworld with /usr/local/pgsql/bin/postmaster -S -B 64 -N 32 -i -D /usr/local/pgsql/data -o -F -h 127.0.0.1.

I have no more solutions. I did ask on #coder-com but apparently no one was online for like half a day...and I decided to post here, in hope that I'll get an answer.

If anymore info is needed just ask.

Alex



_________________
Only God can judge me !
Offline
 Profile  
 
 Post subject: Re: The database is currently unavailable (R)
PostPosted: Thu Nov 26, 2009 5:58 am 

Joined: Thu Mar 23, 2006 2:01 am
Posts: 4
Try this:
1) Open cmaster.inc
2) Search the pg_connect function, wich connects to the postgresql database. You'll most probably find 4 of them:
    a) One for connecting to Local DB with a password
    b) One for connecting to Local DB with no password
    c) One for connecting to Remote DB with a password
    d) One for connecting to Remote DB with no password
3) All of them have an at symbol (@) as a prefix of the function. That instructs PHP to hide any errors/messages returned by that function. Remove the at symbol of proper remote DB pg_connect (it will depends if you use or not a password for connecting (I mean, not using a password is the same as leaving it blank in the conf)
4) Save cmaster.inc. Reload the page. You must be able to see Why it's failing to connect. Then, fix it!
5) Put the at symbol back. Save.
[/list]


BR,

Judge--


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: