Skip site navigation (1) Skip section navigation (2)

Help Me !

From: zhuge xiao <zhuge(at)Rinaix(dot)cn>
To: pgsql-admin(at)postgresql(dot)org
Subject: Help Me !
Date: 2005-12-20 09:44:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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(at)xiao2 src]$ cc -o testlibpq testlibpq.c -lpq

And it can run from the command line:
   [zhuge(at)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));

How can I do? Please help me!

Thank you very much.



pgsql-admin by date

Next:From: Boguk MaximDate: 2005-12-20 10:20:10
Subject: Re: maybe off topic JDBC question
Previous:From: tonyDate: 2005-12-20 09:25:07
Subject: maybe off topic JDBC question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group