Reputation: 11
This code:
#include <iostream>
using namespace std;
int main()
{
cout << "content-type: text/html" << endl << endl;
cout << "<h1>CGI C++ example</h1>" << endl;
return 0;
}
after compilation (in Ubuntu, Apache2) and uploading in my website host, in /cgi-bin/ folder, it works normal Bit if I add string after compilation (in Ubuntu, Apache2) and uploading in my website host, the result is "Internal Server Error"
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "content-type: text/html" << endl << endl;
string alabala;
cout << "<h1>CGI C++ example</h1>" << endl;
return 0;
}
Thanks in advance for comments
Upvotes: 1
Views: 286
Reputation: 11
I found some webhost company blocks non perl cgi script! Then I tried foo.pl is fine! but if i compile from pascal or c++ it fails! The only solution for me, so far is to use VPS with personalized apache conf for my purpose.
Upvotes: 1