CGI Error

Поиск
Список
Период
Сортировка
От Jeff
Тема CGI Error
Дата
Msg-id 974g2q$s9f$1@news.tht.net
обсуждение исходный текст
Список pgsql-interfaces
I'm getting this when access the cgi:

The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:

Here's the cgi code:

int main()
{ printf("Content-Type: %s\n\n", contentType);
 conn = PQconnectdb("dbname=template1"); if (PQstatus(conn) == CONNECTION_BAD) {    printf("Connection to database
failed.\n");   printf("%s", PQerrorMessage(conn));    return(1); }
 
 strcpy(query_string,         "SELECT * FROM cities");
 res = PQexec(conn, query_string);
 if (PQresultStatus(res) != PGRES_TUPLES_OK) {   printf("SELECT query failed.\n");   PQclear(res);   PQfinish(conn);
return(1);}
 
 for (i = 0; i < PQntuples(res); i++)    printf("%s\n", PQgetvalue(res, i, 0)); PQclear(res); PQfinish(conn);
return(0);
}





В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Shankar Gowda
Дата:
Сообщение: unable to find postgresql.jar
Следующее
От: Wasem Peter
Дата:
Сообщение: ODBC examples