View previous topic :: View next topic |
Author |
Message |
TByte -
Joined: 07 Sep 2008 Posts: 1
|
Posted: Sun Sep 07, 2008 8:27 pm Post subject: C++ as CGI |
|
|
Hello
I have a question:
I want to have C++ as CGI/FastCGI.
What have I to do for using C++? e.g.:
If I have e perl script, i write:
Code: | use strict;
print "Conten Type: text/html\n\n";
print "<html><body><b>HELLO BROWSER</b></body></html>"
|
Now I want to can write this:
Code: | #include <iostream>
#include <string>
using namespace std;
int main(string args[])
{
cout << "Content Type: text/html\n\n";
cout << "<html><body><b>HELLO BROWSER</b></body></html>";
}
|
Have anyone an idea?
Thanx already now
---
TByte |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Tue Sep 09, 2008 5:17 am Post subject: |
|
|
Compiling C++ apps and using them as CGI is no problem. Your example would work. Just compile it, rename it with a .cgi extension (or whatever you want) then setup Abyss to execute .cgi files. I've done it before.
As for FastCGI I'm not sure. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
genroxbro -
Joined: 18 Jul 2009 Posts: 3 Location: Canada
|
Posted: Tue Jul 28, 2009 9:18 pm Post subject: C as CGI |
|
|
Hi,
I would like to use CGI scripts written in C NOT Perl, but cant get them to work.
I get the infamous "Premature end of script headers" in the error log.
The script is a simple "Hello World", compiled with GCC.
The output looks fine when executed command line.
Permission are 755, so should be fine as well.
thanks.
_____________________________________
Website I designed for express payday loan company. |
|
Back to top |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Wed Jul 29, 2009 10:35 am Post subject: Re: C as CGI |
|
|
genroxbro wrote: |
I get the infamous "Premature end of script headers" in the error log.
|
Are you sure that you found this error in the Abyss Web Server log ? It looks like an Apache error. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
CoastResearch -
Joined: 21 Apr 2009 Posts: 5
|
Posted: Sat Oct 31, 2009 5:44 am Post subject: |
|
|
We have provided some C++ examples that all run with the Abyss server. (remeber you will need the C++ distributable installed if you do not address the runtime requirements when you link the project) |
|
Back to top |
|
|
|