Hi
I have been trying to run simple helloworld.cgi in Xampp cgi-bin but unsuccessfully (helloworld.pl also does not work).
http://localhost:8080/cgi-bin/helloworld.cgi
The error message is:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
localhost
16/02/2010 23:22:54
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_jk/1.2.28 mod_perl/2.0.4 Perl/v5.10.0
The error log:
[Wed Feb 17 00:22:17 2010] [notice] Server built: Jul 22 2009 11:35:54
[Wed Feb 17 00:22:17 2010] [notice] Parent: Created child process 4316
[Wed Feb 17 00:22:18 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Feb 17 00:22:18 2010] [notice] Digest: done
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Child process is running
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Acquired the start mutex.
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Starting 150 worker threads.
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Starting thread to listen on port 4499.
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Starting thread to listen on port 4499.
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Starting thread to listen on port 8080.
[Wed Feb 17 00:22:20 2010] [notice] Child 4316: Starting thread to listen on port 8080.
[Wed Feb 17 00:22:22 2010] [error] [client 127.0.0.1] C:/xampp/cgi-bin/helloworld.cgi is not executable; ensure interpreted scripts have "#!" first line
[Wed Feb 17 00:22:22 2010] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/xampp/cgi-bin/helloworld.cgi
[Wed Feb 17 00:22:59 2010] [error] [client 127.0.0.1] C:/xampp/cgi-bin/helloworld.cgi is not executable; ensure interpreted scripts have "#!" first line
[Wed Feb 17 00:22:59 2010] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/xampp/cgi-bin/helloworld.cgi
[Wed Feb 17 00:23:01 2010] [error] [client 127.0.0.1] C:/xampp/cgi-bin/helloworld.cgi is not executable; ensure interpreted scripts have "#!" first line
[Wed Feb 17 00:23:01 2010] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/xampp/cgi-bin/helloworld.cgi
[Wed Feb 17 00:24:27 2010] [error] [client 127.0.0.1] C:/xampp/cgi-bin/helloworld.cgi is not executable; ensure interpreted scripts have "#!" first line
[Wed Feb 17 00:24:27 2010] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/xampp/cgi-bin/helloworld.cgi
[Wed Feb 17 00:24:46 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Feb 17 00:24:46 2010] [notice] Child 4316: Exit event signaled. Child process is ending.
[Wed Feb 17 00:24:47 2010] [notice] Child 4316: Released the start mutex
[Wed Feb 17 00:24:48 2010] [notice] Child 4316: All worker threads have exited.
[Wed Feb 17 00:24:48 2010] [notice] Child 4316: Child process is exiting
[Wed Feb 17 00:24:48 2010] [notice] Parent: Child process exited successfully.
The helloworld.cgi:
#!C:\xampp\perl\bin\perl.exe
# Tell perl to send a html header.
# So your browser gets the output
# rather then <stdout>(command line
# on the server.)
print "Content-type: text/html\n\n";
# print your basic html tags.
# and the content of them.
print "<html><head><title>Hello World!! </title></head>\n";
print "<body><h1>Hello world</h1></body></html>\n";
What am I doing wrong & can anyone help me fix this please?