Server Side: Writing CGI using C

started by Flaxen on Mar 6, 2004 — RSS Feed

Flaxen Flaxen
Posts: 28

I'm experimenting with writing CGI using C. The writing of the code is not the problem it's the execution of the code that has stumped me. Using Perl I simply point at the cgi-bin directory, the server finds the perl code and executes it. So, my first efforts with my cleanly compiled binaries was to put them into the cgi-bin directory in the hope that the server would recognise it was binary rather than perl and execute the same. Somewhat naive perhaps, so I wasn't entirely surprised when that didn't work. After much digging around on the web I still can't find the correct way to execute CGI written in C. I own the server so if it's an apache configuration requirement no problem, otherwise can someone give me a few tips or URL's that'll point me in the right direction ?

Joe Gillespie Joe Gillespie
Posts: 528

Have you added .exe to the AddHandler line in httpd.conf?

AddHandler cgi-script .cgi .pl .exe

Apache has to be told that it can expect an .exe because that's what a compiled C cgi would be.

Also, check your cgi log file and see what errors are thrown up.

You are not using Apache on Windows by any chance? I don't think C cgis will work on Windows.

Maskodok Eko Maskodok Eko
Posts: 171

You are not using Apache on Windows by any chance? I don't think C cgis will work on Windows.
TOP SEO | Jasa SEO Profesional

TOP SEO | Jasa SEO Profesional RajaPoker88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya IDRPoker.COM Agen Texas Poker dan Domino Online Indonesia Terpercaya POKERSTAR88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya D

Kokokmas Kokokma Kokokmas Kokokma
Posts: 104

You know, Sim City Societies had a lot of potential, it was a great concept that was horribly developed and lacked any kind of depth. The idea of individualize buildings functioning independently playing its role in a largely diverse and thriving city.

The new Sim City appears to be the classic Sim City gameplay we saw with SC4, combined with a far better developed version of the Societies concepts. Looking great guys, don't let us down.


You must login to reply