PDA

View Full Version : /WHAT/ Internal Server Error!?


Charles Capps
04-08-1999, 07:15 PM
I decided my goal for Spring Break was to test out my perl skills. I did so by making a presentable UBB-clone script. It was developed on my compy, a Win98 system running Apache. Things went well, and I just uploaded the thing here to FQ to test it out on a REAL server when BAM.

Internal Server Error.

I check the chmods, make sure I have my perl and file paths right. They're right. Make sure I didn't make any other stupid errors.

Internal Server Error.

I download the error log.

%% [Thu Apr 8 18:54:15 1999] GET /CCForum/Test/index.cgi HTTP/1.0
%% 500 /big/dom/xsolareclipse/www/CCForum/Test/index.cgi
%request
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Charset: iso-8859-1,*,utf-8
Accept-Encoding: gzip
Accept-Language: en
Connection: Keep-Alive
Host: solareclipse.net
User-Agent: Mozilla/4.51 [en] (Win98; I)
%response

That's it! No explanation. Nothing, it just goes on to the next error. WHAT Internal Server Error? *LOL*

I go into Telnet, I run perl -c on all the scripts, they pass through clean. I run the forum displayer with the proper arguments needed to display the contents of Forum 1. Out comes the HTML! Yet when I access the same thing through the web, I get an ISE.

Here's the URL if you want to see that wonderful 500 ISE page:
solareclipse.net/CCForum/Test/index.cgi (http://solareclipse.net/CCForum/Test/index.cgi)

Remember, I've already eliminated the obvious, or what is apparently obvious to me... http://www.aota.net/ubb/smile.gif

------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
solareclipse.net/ (http://solareclipse.net/)

[This message has been edited by Charles Capps (edited 04-08-99).]

*another edit* BTW, I should mention that ALL of the .cgi files give this error, not just index.cgi.

[This message has been edited by Charles Capps (edited 04-08-99).]

Charles Capps
04-08-1999, 08:01 PM
Ok, this is now a confirmed problem with something I did or somethign on FQ - I gave an EXACT copy of the script (with the FQ paths and all) to a friend, and he installed it fine at Hypermart...

------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
http://solareclipse.net/

Terra
04-08-1999, 08:02 PM
Your 'TEST' directory is mode 777, which will break the suEXEC mechanism for CGI scripts...

Change it to 755 and it should work...

--
Terra
sysAdmin
FutureQuest

Charles Capps
04-08-1999, 08:06 PM
AHA! Fixed! Thanks... Old habits die hard. :-)

------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
http://solareclipse.net/

Ron
05-22-1999, 03:24 PM
<snip>
Your 'TEST' directory is mode 777, which will break the suEXEC mechanism for CGI scripts...
</snip>

I've been beating my head against a wall for 3 days! Is there any documentation on the suEXEC mechanism somewhere to help forestall future head injuries? :)
------------------
Ron Carnell
Passions in Poetry
http://netpoets.com/

SneakyDave
05-22-1999, 03:48 PM
I swear! I was just having the same problem, and YES, I had the directory named TEST also! SAME THING!
But I deleted everything as I attempted to start over, and I come over and read this!

OOOHHHhhh... I'm so mad at myself

Terra
05-23-1999, 09:03 AM
suEXEC is a very exacting security model with 20 steps of sanity before allowing the script to run...

It takes time to get the hang of it, but the end result is tight code, and secure operating environment for your scripts...

And yes, I've banged my head against many walls when doing system level CNC coding and living within the constraints of suEXEC...[nbsp][nbsp]On the flipside, without suEXEC - the CNC modules would never have been reality (unless I had setuid them as root -- I think NOT) ;)

I have studied the following link in depth, and now suEXEC and myself are very good friends...
www.apache.org/docs/suexec.html (http://www.apache.org/docs/suexec.html)

<edit>fixed URL</edit>

--
Terra
--security is inversely proportional to convenience--
FutureQuest
[This message has been edited by ccTech (edited 05-24-99)]

Ron
05-24-1999, 09:39 AM
Thanks, Terra, for the reference. Next time I have insomnia, I'll ask you for something else to read. :)

It was helpful, though, if only in showing there is very little else (beyond chmod) that we, as user's need concern ourselves with. Interestingly, though, the problem I had wasn't directly referenced in these docs. I had a data file that was writable, not a directory or a program as referenced in the security model, but that nonetheless blew me into error 500 waters. Obviously, the same security concepts apply to data files, though, so I assume it works the same and just wasn't mentioned. Changing the rights on the file did solve the problem, at any rate.

Again, thanks...

------------------
Ron Carnell
Passions in Poetry
http://netpoets.com/

farlane
06-12-2000, 02:01 PM
I'm happy to have found this post. I was trying to set up a script on merchantquest which used a 777 datafile -- it wouldn't work on the web but would via shell.

Interestingly enough, I couldn't get it to run until I deleted the entire directory and re-uploaded.
------------------
farlane aka andrew mcfarlane
http://www.leelanau.com/pages/farlane/