C CGI problima.

keramida at ceid.upatras.gr keramida at ceid.upatras.gr
Fri Feb 26 15:42:12 EET 1999


> 
> Geia xara se olous.
> 
> Exo to parakato kommati kodika mesa se ena C CGI programma.
> Otan trexo to programma apo command line leitourgei kanonika.
> Otan to trexo apo ton WEB san CGI tote bgazei Internal Server Error.
> 
>   FILE *fli;
>   fližn("/home/ets/debuf.log", "w+");
>   fprintf(fli, "content length: %s \n \n", p) ;
>   fflush(fli);
>   fclose(fli);
> 

To internal error einai logiko.  H ekshghsh einai to gegonos pos to
header `Content-length' prepei na tupothei sto standard output, ki oxi
sto log arxeio.

>   fprintf(fli, "content length: %s \n \n", p) ;

Edw tupwneis sto `fli' to content-length, ki o kaimenos o Apache sou den
to blepei pote.  Ase pou pote den elegxeis an to fopen() sou epestrepse
NULL pointer (pou shmainei oti den anoikse to arxeio)...

Dokimase kati san:

	FILE *log;

	/* Send header to Apache.  */
	printf("Content-length: text/plain");

	if ((log 		return -1;
	fprintf(log, "Content-length: text/plain");
	fflush(log);
	fclose(log);

Mallon tha paiksei :)
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================



More information about the Linux-greek-users mailing list