aplelois
asked on
500 Internal Server Error
hello,
I dont know what im doing wrong with this c++ script.
I compile it with Dev C++ v4, then I upload the file as .cgi
change to 755 and try to run it and nothing!!
#include <iostream.h>
#include <time.h>
int main()
{
time_t now;
time(&now);
cout << "Content-type: text/html\n\n";
cout << "<html>";
cout << "<head><title>Hello World</title></head>";
cout << "<H1>Hello World</H1>";
cout << "I'm a C++ Classless Program<br>";
cout << ("It is now %s",ctime(&now));
cout << "</body>";
cout << "</html>";
}
the log shows me this message
[2006-05-19 01:46:25]: info: (real/target/actual) uid: (home/site/lses) gid: (home/site/lses) cmd: test.cgi alt_doc_root: /home/virtual/site1/fst/va r/www chroot: 0
I dont know what im doing wrong with this c++ script.
I compile it with Dev C++ v4, then I upload the file as .cgi
change to 755 and try to run it and nothing!!
#include <iostream.h>
#include <time.h>
int main()
{
time_t now;
time(&now);
cout << "Content-type: text/html\n\n";
cout << "<html>";
cout << "<head><title>Hello World</title></head>";
cout << "<H1>Hello World</H1>";
cout << "I'm a C++ Classless Program<br>";
cout << ("It is now %s",ctime(&now));
cout << "</body>";
cout << "</html>";
}
the log shows me this message
[2006-05-19 01:46:25]: info: (real/target/actual) uid: (home/site/lses) gid: (home/site/lses) cmd: test.cgi alt_doc_root: /home/virtual/site1/fst/va
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OK, well, since I am not a C++ coder I can't offer anymore help.
ASKER