Link to home
Start Free TrialLog in
Avatar of aplelois
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/var/www chroot: 0
ASKER CERTIFIED SOLUTION
Avatar of Perl_Diver
Perl_Diver

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aplelois
aplelois

ASKER

well I downloaded a c script from a website and its running fine!
OK, well, since I am not a C++ coder I can't offer anymore help.