html inside cgi-bin gets a 500 error

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
mickaelAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vmpnCommented:
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
mickaelAuthor Commented:


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
ozoCommented:
Does your server error log contain any messages describing the error?
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

mickaelAuthor Commented:
[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
remboCommented:


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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mickaelAuthor Commented:
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
ozoCommented:
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
mickaelAuthor Commented:
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
ozoCommented:
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
mickaelAuthor Commented:
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
ozoCommented:
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
mickaelAuthor Commented:
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
ozoCommented:
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
mickaelAuthor Commented:

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
remboCommented:

What platform are you working on?

-Tony

0
ozoCommented:
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
mickaelAuthor Commented:
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
ozoCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.