View Full Version : 500 Internal Server error - CGI Question
the600club
03-10-1999, 06:54 PM
I am trying to set up a message board script
(Message Board V2.0) and I got everything install and it seemed to be working fine until I attempt to view the messages then I keep getting a 500 Internal Server error.
I am guessing it's because .html files cannot be viewd in the CGI bin, if this is the case then how would I go about running the script within the CGI bin? Help!
http://xhyeminds.futurequest.net/cgi-bin/messageboard/view.pl
-Rick
Terra
03-10-1999, 08:07 PM
hmmm, I just posted and tested and everything appears fine...
Keep an eye on your script and error logs...
logs_cgi/script
logs_web/error
They will contain helpful hints in isolating any problems you may be having...
--
Terra
sysAdmin
FutureQuest
I am guessing it's because .html files cannot be viewd in the CGI bin
You're right on this part. Everything inside the cgi-bin is automatically assumed to be an executable by the server.
Del
this post is just for general knowledge, and possible future reference
the600club
03-11-1999, 03:41 AM
Then how would I go about embedding the Script within an html page to futher customize the look of it?
<guessing here>
Well, I'm not totally sure what you mean by embedding the script in an html page, but I'll give it a shot.
I noticed on your main page (presumably index.shtml) you have this line;
<!--#exec cgi="http://xhyeminds.futurequest.net/cgi-bin/messageboard/view.pl" -->
Well, that won't work http://www.aota.net/ubb/smile.gif You need to replace it with this line;
<!--#exec cgi="/big/dom/xhyeminds/cgi-bin/messageboard/view.pl" -->
That should embed the script withing your regular html coding on your index page. However, the script (view.pl) creates it's own headers to be displayed as regular html, so it will still print these out. For example, your page already has <html><head></head><body> etc... The script will print out it's own <html><head></head> etc... tags as well, thus embedding one webpage inside another. This should not affect most browsers, but it may cause weird behaviour in some browsers. You may want to consider having your index.shtml page have nothing in it except the SSI call to view.pl. Also, view.pl will print a line that looks similar to this;
Content-type: text/html
You may find that line actually being printed in your page as plain text. If that happens, let me know and we'll figure it out.
Just by the look of your current front page (which is blank, but contains the SSI tag), is it safe to assume that your entire site will consist solely of the message forums? (Just curious, if so there is another workable solution that does not use SSI).
Also, to further customize the look of the script, simply open the script's files up in your favorite text editor, find where it prints out the HTML coding, and adjust it to taste. Whenever you see a Perl script that renders as html in a browser, it is just printing out normal html coding (if you're on a PC, go to your script in your browser, right click and view the source. it's just plain ol' html in there http://www.aota.net/ubb/smile.gif )
If this doesn't answer your question, let me know and we'll keep working on it.
Del
the600club
03-11-1999, 04:14 AM
Del,
Thanks for the tip, I didn't realize that it had to be an .shtml file, but now that it is, It is saying:
"[an error occurred while processing this directive]"
Any Idea's on what coulb be causing this?
I have tried it both with an without the <html> and <body> tags with the same result.
-Rick
------------------
Hi Rick
Did you change the SSI tag to show the path to the script, not the URL? SSI's don't work with urls (they also don't work across different domains, but that's a different issue). Make sure to change the SSI tag to this;
<!--#exec cgi="/big/dom/xhyeminds/cgi-bin/messageboard/view.pl" -->
and it should work just fine. If not, try it with this line instead;
<!--#include virtual="/big/dom/xhyeminds/cgi-bin/messageboard/view.pl" -->
If that still doesn't do it, let me know http://www.aota.net/ubb/smile.gif
Del
the600club
03-11-1999, 04:32 AM
Del,
No Dice, I tried all the different variations with Those two tags and still the same result...
What else could cause this error to occur?
I wouldn't have to Chmod the .shtml file would I?
-Rick
No, there's no reason to chmod the .shtml file.
Unfortunatly (sp?) there are quite a few reasons for the [error occurred] error to show up... Check your error logs (named 'error' in /big/dom/xdomain/logs_web (should be a symlink to /big3/shadowdom/xdomain/logs_web)) and see if it has any information that might help (new stuff should be at the very bottom).
I don't know why it's not working, I'm probably missing something vital though (it is almost bedtime hehe)
Del
the600club
03-11-1999, 05:07 AM
Del,
Bet Time? What is that? We don't *REALLY* need sleep that is just what they Want you to believe... Either that or I am so Sleep Deprived that I don't know what I am saying (Maybe a bit of both, lol)
I Checked the error log and this is the message I got, perhaps this can shed some light on the situation.
"invalid CGI ref "/big/dom/xhyeminds/cgi-bin/messageboard/view.pl" in /big/dom/xhyeminds/www/index.shtml"
Thanks for all your help, it is appreciated.
-Rick
Well, I have no idea what "invalid CGI ref" means... (trying to come up with other ideas)
Try;
<exec cmd="/big/dom/xhyeminds/cgi-bin/messageboard/view.pl"-->
Also try;
<exec cgi="/cgi-bin/messageboard/view.pl"-->
And;
<include virtual="/cgi-bin/messageboard/view.pl"-->
If none of those do it, then I'm stuck, sorry. Maybe one of the others who has more experience with SSI than I do can help.
One thing I just now noticed (it's gonna bug me if this fixes it, but I doubt it will) In the SSI tag, you've got a space between the ="blah" and the -->. Take that space out, so it's just ="blah"-->. I've heard that sometimes errant spaces (there, and in between the <!-- and the #command) can cause funky errors.
Bed time is that thing that happens when you've been staring at text so long you swear you see the individual characters start doing The Time Warp (well, that or you've had waaay too much buffalo wings and beer (or tequila), but I haven't had buffalo wings and beer (or tequila) in a long time)
---------
Del
it's just a jump to the left
Justin
03-11-1999, 10:13 AM
I don't know if I can help with why the script isn't working without seeing it... but as for SSI's, they always must be like this:
<!--#include file="blah" -->
Note there is no space between the <!--# and the command... and always a space between "blah" and the -->. I don't think it will work any other way.
Since the script does work, then it should work fine like this:
<!--#include virtual="/cgi-bin/messageboard/view.pl" -->
although personally I would recomend customizing the HTML output of the script. But it should work like that.
Also, I agree, the <html><head><etc> shouln't be repeated, but that will not cause the script to fail, it would only make the HTML look funny http://www.aota.net/ubb/smile.gif
I've never used full paths in an include unless it's needed - my banner script works like that above - just /cgi-bin/etc instead of /big/dom/etc... I know both should work though. Anyway, as long as the script is functioning, and I checked and it is, then that should do it http://www.aota.net/ubb/smile.gif "Invalid CGI ref" sounds like a file not found type of error - I don't see why, though, so it probably means something different.
Hope this helps http://www.aota.net/ubb/smile.gif
------------------
Justin Nelson
FutureQuest Tech Support
hearts
03-11-1999, 11:15 AM
i have a question.. this SSI command is to make the script run? I wonder, is there an SSI command in the script that is wrong? I am not looking at the script, and I have this way of guessing at things.
IF that path is correct, seems like something else is trying to interfere with it.
If ya want.. send me the script in a zip file and I will see if I can install it with any probs or accomplishment.
I am just learning.. but I certainly don't mind trying. http://www.aota.net/ubb/smile.gif
------------------
~~~ hearts ~~~
Heartistic Designs www.heartisticdesigns.com (http://www.heartisticdesigns.com)
Hearts www.heartsangels.com/hearts (http://www.heartsangels.com/hearts)
Heartistic Wishes www.heartsweb.com/heartisticwishes (http://www.heartsweb.com/heartisticwishes)
Justin
03-11-1999, 04:40 PM
Hearts, that's what gets me about it. The script does run:
http://xhyeminds.futurequest.net/cgi-bin/messageboard/view.pl
What he wants to do is run the script from an shtml page, like you would a counter or a banner rotation script. You can usually do this by including the script, which will include the output of the script since it is executable.
The error isn't in the script this time, it has to be in the SSI used to call it.
I'm kinda stumped right now...
------------------
Justin Nelson
FutureQuest Tech Support
The correct way to add it to your index.shtml file would be
<!--#exec cgi="/cgi-bin/messageboard/view.pl" -->
What's happened is you probably had it right the first time but didn't have the page named with an shtml extension...then received other suggestions and tried them .. somewhere lil things became flawed...
When de-bugging it's always best to try one thing at a time... if it doesn't work, go back to where you started and try the next thing... by continuing to add each idea you could create a mess http://www.aota.net/ubb/wink.gif
Deb
[This message has been edited by Deb (edited 03-11-99).]
hearts
03-11-1999, 06:13 PM
that's okay pinky.. we will take over the world tomorrow night..
I installed commerce.cgi and changed everything I was told to ... when I try to load the http://dreamers-world.com/cgi-bin/protected/manager.cgi?welcome_screen=yes
I just get the 500 internal server error msg
Yes... I looked at the log and it tells me the action isn't allowed, I don't understand why it isn't though.
Mist
(soon to be hairless as well as clueless!) ;-D
Justin
03-13-1999, 08:59 AM
It sounds like it is trying to write a file inside a directory that isn't 777 (or 755 here). Other than that, I'd have to know the script to figure it out...
------------------
Justin Nelson
FutureQuest Tech Support
hearts
03-13-1999, 11:54 AM
Hey Mist,
I got a question,
This is just a pure guess, (i hope ya don't mind) Is the CGI calling on a html file or is the cgi trying to produce it's own html? What was the url you were at prior to the one listed?
I tried the url you have here in the forum and it says 404 not found.
Reason I asked, is I had just installed a script that something similar to that would actually be using a html file. If this is the case, do you have the html files in your cgi-bin? IF so, you will have to move the html files to your www dir. And change your paths in your .cgi or .pl scripts.
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.