질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

좀알려주세여...

작성자 정보

  • 초보 작성
  • 작성일

컨텐츠 정보

본문

흑 죽겠습니다.제가 CGI 를 잘몰라서요.. 개발환경은 리눅스고요 컴파일은 CC

이용했습니다. 자꾸에러가 떠서요.. 부탁드립니다. 은혜잊지 않겠습니다.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost.localdomain and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/1.3.28 Server at 210.112.129.168 Port 80

 

서버측 로긴에러정리입니다.

[Thu Sep  4 02:41:33 2003] [error] [client 210.112.129.222] script not found or unable to stat: /usr/local/apache/htdocs/cgi-bin/test.cgi

[Thu Sep  4 02:40:59 2003] [error] [client 210.112.129.222] Premature end of script headers: /usr/local/apache/htdocs/cgi-bin/guest.cgi

어떤내용인지도 모르겠고..제생각에는 소스가 잘못된거 같아서요..

파일 명은 test.cgi 고 원본파일은 test.c 입니다.

#include <stdio.h>
#include <stdlib.h>

#define FILENAME "/image/test.dat"

char getValue()
{
 FILE *fp;
     char value[512] ;
 if( (fp=fopen(FILENAME,"r"))==NULL )
 {
  if( (fp=fopen(FILENAME,"w"))==NULL )
  {
   printf("<h1>Can not make a count file in test.bmp</h1>");
  };
 }else
  {
  fscanf(fp,"%s",&value);
 }
 
 fclose(fp);
 return *value; 
}


main()
{
 printf ( "Content-type:text /html %c%c",10,10) ;
 printf ( "<img src= %s width=352 height=288 >",getValue()) ;
 return 0;
}

마지막으로 불러들이는 html 문서 부분입니다.

<IFRAME SRC="cgi-bin/test.cgi"  marginheight="0" marginwidth="0" width="300" height="300">

 

공부하는 학생인데..어디다가 하소연 할때도 없고..공부를 다시

해야 할지..정말 미치겠습니다. 부탁드립니다. 꼭좀 알려주세여..

메신져...sajakin@hotmail.com  메일 sajakin@naver.com계속 리필하겠습니다.

아무나 도와주세여...

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,043 명
  • 현재 강좌수 :  35,853 개
  • 현재 접속자 :  68 명