D
Don Blow, Jr.
I am running the simple program shown below (written in c):
-----------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
printf("Content-Type: text/html\n\n");
printf("<HTML><HEAD><TITLE>CGI Output</TITLE></HEAD>\n");
printf("<BODY>\n");
printf("<H1>Hello, world.</H1>\n");
printf("</BODY></HTML>\n");
return 0;
}
-----------------------------------------------------------------------
When I compile this program and run it on a webpage through the Xitami
server
I get a blank page. When I run it in a DOS command prompt window I get the
following:
-----------------------------------------------------------------------
Content-Type: text/html
<HTML><HEAD><TITLE>CGI Output</TITLE></HEAD>
<BODY>
<H1>Hello, world.</H1>
</BODY></HTML>
C:\Xitami\cgi-bin>
C:\Xitami\cgi-bin>
C:\Xitami\cgi-bin>
-----------------------------------------------------------------------
This looks right to me. I have used the xitami server with CGI before and it
gave
me no problems, but now all I get is a blank page when I run any cgi
program. I don't
know if it is my programming syntax or a config issue or what. Has anyone
had this
problem before too and can anyone identify what the issue here is?
-----------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
printf("Content-Type: text/html\n\n");
printf("<HTML><HEAD><TITLE>CGI Output</TITLE></HEAD>\n");
printf("<BODY>\n");
printf("<H1>Hello, world.</H1>\n");
printf("</BODY></HTML>\n");
return 0;
}
-----------------------------------------------------------------------
When I compile this program and run it on a webpage through the Xitami
server
I get a blank page. When I run it in a DOS command prompt window I get the
following:
-----------------------------------------------------------------------
Content-Type: text/html
<HTML><HEAD><TITLE>CGI Output</TITLE></HEAD>
<BODY>
<H1>Hello, world.</H1>
</BODY></HTML>
C:\Xitami\cgi-bin>
C:\Xitami\cgi-bin>
C:\Xitami\cgi-bin>
-----------------------------------------------------------------------
This looks right to me. I have used the xitami server with CGI before and it
gave
me no problems, but now all I get is a blank page when I run any cgi
program. I don't
know if it is my programming syntax or a config issue or what. Has anyone
had this
problem before too and can anyone identify what the issue here is?