Solved

html inside cgi-bin gets a 500 error

Posted on 1997-10-16
18
651 Views
Last Modified: 2013-12-20
Hello,

I am trying to run a forum and display other html pages in cgi-bin and below but I systematically get an error 500?

Can this problem been solve?

1) How

2) is security an issue

Thank you
0
Comment
Question by:mickael
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
  • 2
  • +1
18 Comments
 
LVL 3

Expert Comment

by:vmpn
ID: 1830941
500 is stands for Server Error,  the server may run out of threads for running CGI. Possible Causes: a lot users use the same web server sumunteniously, your CGI do not terminate (new thread is allocated for each instance of CGI). Possible Solutions: increase number availiable threads, check if your CGI terminite fully (free memory, do not leave any resident parts)

Sincerely,
VMPN
0
 

Author Comment

by:mickael
ID: 1830942


Hello,

Thanks for your reply.

I understand that the problem comes from trying and sysytematically execute programs in this directory and below.

The server is not reading but executing...

How can this be overcomed?

Thank you
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830943
Does your server error log contain any messages describing the error?
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:mickael
ID: 1830944
[Thu Oct  9 01:35:49 1997]
HTTPd/CGI: exec of
/usr/local/etc/httpd/htdocs/jeuxvideo/cgi-bin/wwwboard/forum.htm
failed, errno is 8
[Thu Oct  9 01:37:02 1997] HTTPd: malformed header from script
/usr/local/etc/httpd/htdocs/jeuxvideo/cgi-bin/wwwboard/forum.htm
0
 
LVL 4

Accepted Solution

by:
rembo earned 50 total points
ID: 1830945


Well, it looks like your CGI is not valid.  forum.htm
is not a valid name and the errno 8 is ECHILD which
means that the Web Server couldn't start the process.

Make sure that your script is a valid executable.
You need to be able to execute it from the command
line for your Web Server to be able to start it.

-Tony


0
 

Author Comment

by:mickael
ID: 1830946
Ok, however I have tried to put a simple HTML page witha line or 2 of HTML and it also tries to execute unstead of displaying ?


0
 
LVL 84

Expert Comment

by:ozo
ID: 1830947
Could you put it under htdocs instead of under cgi-bin?
What path do you use in the url to open them?
Are you using anything like
ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/
in your server configuration?  or
0
 

Author Comment

by:mickael
ID: 1830948
Yes, I am using the above path for script aliases

here is the url of the script
http://www.jeuxvideo.com/cgi-bin/wwwboard/forum.htm
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830949
Hmm, then where did the "/htdocs/jeuxvideo/" come from in the above error?

Could you just move forum.htm into /htdocs//wwwboard/ and call it with
http://www.jeuxvideo.com/wwwboard/forum.htm
0
 

Author Comment

by:mickael
ID: 1830950
Not really, it is full of files...

/usr/local/etc/httpd/htdocs/jeuxvideo/cgi-bin/wwwboard/forum.htm

jeuxvideo is actiually a virtual hoast with its own domain name; it has a cgi-bin of its own (I think is is actually an aliase of the main cgi-bin (htdocs/cgi-bin)

and forum is a directory inside the cgi-bin where the forum html files are keept.

Voila for the layout...

when trying to read an html file in forum the server tries to execute it! thinking it is some kind of script/cgi
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830951
Well, if you can't link it to a non ScriptAlias directory under DocumentRoot,
then how about making your .htm file executable, and adding something like
#!/usr/bin/tail +2
Content-type: text/html

...
to the beginning of it?
0
 

Author Comment

by:mickael
ID: 1830952
Hi,

here is my page html, I still get a 500 error


#!/usr/bin/tail +2
Content-type: text/html
<HTML>
<HEAD>
<TITLE>testing</TITLE>
</HEAD>
<body bgcolor="#FFFFFF">



testing

<p>



</BODY>
</HTML>
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830953
And what does your server error log say this time?
There should have been a blank line after that  
Content-type: text/html

(but I don't think that would cause a 500 error)
Is /usr/bin/tail the right place to find it on your system?
Is it, and your file, executable by the server?
0
 

Author Comment

by:mickael
ID: 1830954

Hi,

I have inserted a space but I still get a 500 type error.

here is the error_log

[Fri Oct 17 07:51:37 1997] invalid CGI ref /usr/local/etc/httpd/htdocs/jeuxvideo/cgi-bin/mess/message.plx in /usr/local/etc/httpd/htdocs/jeuxvideo/videcount.htm


Is /usr/bin/tail the right place to find it on your system?

Well, I ahve never seen the tail script/program you are refering.

I do have a user/bin with sort, seed, mai, Mail, finger, date, ccp, basename awk  and autoreply

Thanks,
Mickael


0
 
LVL 4

Expert Comment

by:rembo
ID: 1830955

What platform are you working on?

-Tony

0
 
LVL 84

Expert Comment

by:ozo
ID: 1830956
try typing
which tail
or
man tail
at the command prompt, do they tell you where to find it?
(otherwise, we could insert an awk script at the beginning)
0
 

Author Comment

by:mickael
ID: 1830957
Unix BSDI vs 3

When typind man tail I get some info about this command but I do not see it any where on the site...
0
 
LVL 84

Expert Comment

by:ozo
ID: 1830958
does
whereis tail
do anything? or
tail /usr/local/etc/httpd/htdocs/jeuxvideo/cgi-bin/wwwboard/forum.htm
It seems unusual for a system not to have it at all, but if not, an alternative might be
#!/bin/sh
cat <<ENDHERE
Content-type: text/html
 
<HTML>
...
</HTML>
ENDHERE

no other blank space on the line with the final ENDHERE
(of course, we may then have to search for where sh is on your system)
Do your real .cgi programs have a #! line at the top?  What do they use?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question