ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I tried both a simple html page and a cgi script from sourceforge.
[B}Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
[/B]
from var/log/httpd/error_log
Redhat ES 3
[Mon Sep 05 14:03:03 2005] [error] [client 12.222.119.135] Premature end of script headers: howto.html
[Mon Sep 05 14:03:04 2005] [error] [client 12.222.119.135] (8)Exec format error: exec of '/var/www/cgi-bin/handconverter/howto.html' failed
[Mon Sep 05 14:03:04 2005] [error] [client 12.222.119.135] Premature end of script headers: howto.html
[Mon Sep 05 14:03:14 2005] [error] [client 12.222.119.135] attempt to invoke directory as script: /var/www/cgi-bin/
[Mon Sep 05 14:04:53 2005] [error] [client 12.222.119.135] (8)Exec format error: exec of '/var/www/cgi-bin/index.html' failed
[Mon Sep 05 14:04:53 2005] [error] [client 12.222.119.135] Premature end of script headers: index.html
The same thing happens when I try to access a CGI script downloaded from sourceforge.
[Mon Sep 05 14:15:00 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
[Mon Sep 05 14:15:01 2005] [error] [client 12.222.119.135] (2)No such file or directory: exec of '/var/www/cgi-bin/handconverter/hhconverter.cgi' failed
[Mon Sep 05 14:15:01 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
[Mon Sep 05 14:15:02 2005] [error] [client 12.222.119.135] (2)No such file or directory: exec of '/var/www/cgi-bin/handconverter/hhconverter.cgi' failed
[Mon Sep 05 14:15:02 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
[Mon Sep 05 14:15:04 2005] [error] [client 12.222.119.135] (2)No such file or directory: exec of '/var/www/cgi-bin/handconverter/hhconverter.cgi' failed
[Mon Sep 05 14:15:04 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
Originally posted by wacki
[Mon Sep 05 14:03:03 2005] [error] [client 12.222.119.135] Premature end of script headers: howto.html
[Mon Sep 05 14:03:04 2005] [error] [client 12.222.119.135] (8)Exec format error: exec of '/var/www/cgi-bin/handconverter/howto.html' failed
[Mon Sep 05 14:03:04 2005] [error] [client 12.222.119.135] Premature end of script headers: howto.html
[Mon Sep 05 14:03:14 2005] [error] [client 12.222.119.135] attempt to invoke directory as script: /var/www/cgi-bin/
[Mon Sep 05 14:04:53 2005] [error] [client 12.222.119.135] (8)Exec format error: exec of '/var/www/cgi-bin/index.html' failed
[Mon Sep 05 14:04:53 2005] [error] [client 12.222.119.135] Premature end of script headers: index.html
Here you were trying to run HTML files within a cgi-bin directory. That obviously doesn't work. In fact, you can probably move all your stuff outside of cgi-bin and put it somewhere else; since the CGI script already has a ".cgi" extension.
Quote:
Originally posted by wacki [I]
The same thing happens when I try to access a CGI script downloaded from sourceforge.
[Mon Sep 05 14:15:00 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
[Mon Sep 05 14:15:01 2005] [error] [client 12.222.119.135] (2)No such file or directory: exec of '/var/www/cgi-bin/handconverter/hhconverter.cgi' failed
[Mon Sep 05 14:15:01 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
[Mon Sep 05 14:15:02 2005] [error] [client 12.222.119.135] (2)No such file or directory: exec of '/var/www/cgi-bin/handconverter/hhconverter.cgi' failed
[Mon Sep 05 14:15:02 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
[Mon Sep 05 14:15:04 2005] [error] [client 12.222.119.135] (2)No such file or directory: exec of '/var/www/cgi-bin/handconverter/hhconverter.cgi' failed
[Mon Sep 05 14:15:04 2005] [error] [client 12.222.119.135] Premature end of script headers: hhconverter.cgi
Are you sure that you put in the correct path to Perl after the shebang on the first line of the script? Do "which perl" to find the path to Perl.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.