2012-01-13 6 views
1

Я собрал проект C++ для FastCGI, скопировал исполняемый файл в каталог www, открыл через браузер - и получил 500 ошибок (время ожидания). Что я не так?FastCGI и Apache и C++

ОС Ubuntu 10.05, сервер: Apache

источник C++ код:

#include <fcgi_stdio.h> /* fcgi library; put it first*/ 
#include <fcgiapp.h> 
#include <cstdlib> 
#include <iostream> 

using namespace std; 
int count; 

int main(int argc, char** argv) { 


    /* Response loop. */ 
     while (FCGI_Accept() >= 0) { 
     cout<<"Content-type: text/html\r\n" 
       "\r\n" 
       "<title>FastCGI Hello! (C, fcgi_stdio library)</title>" 
       "<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>" 
       "Request number %d running on host <i>%s</i>\n"; 
     } 
    return 0; 
} 

ответ

Смежные вопросы