2012-01-13 10 views
1

FastCGI用のC++プロジェクトを作成し、実行可能ファイルをwwwディレクトリにコピーし、ブラウザで開き、500エラー(タイムアウト例外)を取得しました。何が間違っていますか?FastCGIとApacheとC++

OSの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; 
} 

答えて

関連する問題