Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GRMrGecko

macrumors member
Original poster
Jun 7, 2008
89
0
Nowhere and everywhere
How can I add CGI to my own server? I've been searching for almost a week. I found FastCGI but I don't quite understand it. Where is the documentations on how to add support to your own server? how can I add it? please someone help me!

Thanks for any help,
Mr. Gecko
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
How can I add CGI to my own server? I've been searching for almost a week. I found FastCGI but I don't quite understand it. Where is the documentations on how to add support to your own server? how can I add it? please someone help me!

Thanks for any help,
Mr. Gecko

Do you mean a server you have written yourself?
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
What else could I mean when I'm writing it in the programming side.

No need to be rude. Some people write very non programming related things in this forum. Best bet would be to look at the Apache source code or LightHTTP and see how one of those projects do it and then implement the same sort of thing in your own server.
 

GRMrGecko

macrumors member
Original poster
Jun 7, 2008
89
0
Nowhere and everywhere
No need to be rude. Some people write very non programming related things in this forum. Best bet would be to look at the Apache source code or LightHTTP and see how one of those projects do it and then implement the same sort of thing in your own server.

CGI appears to just be a perl script...
Can't I just use NSTask and make it run it and return everything that is needed to be returned, parsing out headers...?
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
CGI appears to just be a perl script...
Can't I just use NSTask and make it run it and return everything that is needed to be returned, parsing out headers...?

Depends on the performance of that task. CGI scripts can be written in many languages such as C, Perl, Python, Ruby etc etc. If it is particularly slow then you will want to find a better way of doing it. Looking at the Apache source code will give you a better understanding of how other projects manage it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.