Hello, I'm surprised by the speed of execution of programs in C compared to PHP, so I decided to work with CGI programs.
I did a "Hello, World" and compiled it on Linux, but after uploading to the server, gives me this error.
Here is the source code.
This was compiled under an i5 processor x86-64 Debian distrubution.
I did a "Hello, World" and compiled it on Linux, but after uploading to the server, gives me this error.
lscgid: execve():/hsphere/local/home/test/cgi-bin/a.cgi: Exec format error
Code:
#include <stdio.h>
int main() {
printf("Content-Type: text/plain;charset=us-ascii\n\n");
printf("Hello world\n\n");
return 0;
}
Last edited by a moderator: