4
4
4gn2015-10-23 02:40:32
C++ / C#
4gn, 2015-10-23 02:40:32

C++ cgi won't start and I can't figure out why?

I'm just starting to learn c++ in cgi, once I managed to run it on a hosting, but with a call to support. Maybe they did something, I don't know.
But now I'm trying on my own and it doesn't work.
i compiled and named the file hello.cgi i found the code here:
www.purplepixie.org/cgi/howto.php

#include <stdio.h>

int main(void)
 {
 printf("Content-type: text/html\n\n");
 printf("<html><title>Hello</title><body>\n");
 printf("Goodbye Cruel World\n");
 printf("</body></html>");
 return 0;
 }

but it gives an error 500. file permissions are not affected, since my working file that works - if you rename it or set permissions to 700 as the default - it always works.
and the new file does not work as cgi - this is what support answered me last time. I don’t remember what I completed so that he began to work out like a cgi and now I can’t repeat the success.
plz help run simple c++ code on server

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question