From: zhuge xiao <zhuge@Rinaix.cn>
To: pgsql-admin@postgresql.org
Subject: Help Me !
Date: Tue, 20 Dec 2005 17:44:44 +0800
Message-ID: <43A7D28C.8040504@Rinaix.cn> (raw)
Help me!
I have edited the program testlibpq.c which is copied from the
PostgreSQL document to make it become a CGI program. And I have
succeeded to compile the programme, testlibpq.c from the command line:
[zhuge@xiao2 src]$ cc -o testlibpq testlibpq.c -lpq
And it can run from the command line:
[zhuge@xiao2 src]$ ./testlibpq
Then, I copied the excuteable program to the CGI directory,
/var/www/cgi-bin. And let it run from the Mozilla Firefox browser whose
URL was http://localhost/cgi-bin/testlibpq. But I failed. The result was
that the below message was displayed in the browser:
could not connect to server: Permission denied
Is the server running locally and accepting connections on Unix domain
socket "/tmp/.s.PGSQL.5432"?
The above message was produced by the below code:
if (PQstatus(conn) != CONNECTION_OK)
{
fprintf(stdout, PQerrorMessage(conn));
exit_nicely(conn);
}
How can I do? Please help me!
Thank you very much.
zhuge@Rinaix.cn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: zhuge@Rinaix.cn
Subject: Re: Help Me !
In-Reply-To: <43A7D28C.8040504@Rinaix.cn>
References: <43A7D28C.8040504@Rinaix.cn>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox