Server Error 500. Total Newbie. Ugh. | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Server Error 500. Total Newbie. Ugh.

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-05-2002
paqi the black paqi the black is offline
Registered User
 
Join Date: Aug 2002
Last Activity: 6 August 2002, 6:35 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Server Error 500. Total Newbie. Ugh.

Hi everybody...
I'm trying to run some very simple cgi scripts on my server whilst I learn perl. Today is day 3 of that process, so I apologize in advance for not having enough knowledge to ask the right questions.

Any program I try to execute gives me an Internal Server Error (500) message. Even something as simple as 'helloworld.cgi' or .pl.

I've tried running such a simple program so that I can get one program up and running. My troubleshooting so far:
i. is the computer on?...yup
ii. can i upload HTML files to the server and have them work ?...yup
iii. what are the permissions for the stock cgis on the server ? Do those work for my program ? ....nope.
1. Doublecheck: uploaded in ASCII ? ....yup
2. Correct path to perl ?.....yup, confirmed by sysadmin
3. path to program is cgi-bin/learnperl/helloworld.cgi.

So I chmod the folder learnperl to 755, and the program helloworld.cgi to 755. No dice. Try the both with 751. 777. No dice.

Try them with all combinatorial possibilities for permissions.

Not working.

Anybody out there see what I'm missing ?
I keep putting quarters in the jukebox but nothing's coming out.

Help!

Thanks...

-Pascal

p.s. FTP client is FETCH for the mac.
Sponsored Links
    #2  
Old 08-06-2002
Optimus_P Optimus_P is offline Forum Advisor  
flim flam flamma jamma
 
Join Date: May 2001
Last Activity: 24 March 2008, 9:43 PM EDT
Location: Chicago IL, USA
Posts: 1,006
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
Internal Error 500:
The server was unable to send the html document to you due to an internal (server software) error.
check your httpd server.

heres a list of common error codes for html.
http://docs.yahoo.com/docs/writeus/error.html
Sponsored Links
    #3  
Old 08-06-2002
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
 
Join Date: Jul 2002
Last Activity: 26 May 2006, 8:38 PM EDT
Location: new york
Posts: 1,025
Thanks: 0
Thanked 1 Time in 1 Post
i noticed you said uploaded in ascii, ive always thought that you should up load in binary, just an observation.
    #4  
Old 08-06-2002
auswipe's Avatar
auswipe auswipe is offline Forum Advisor  
Registered User
 
Join Date: Nov 2001
Last Activity: 28 May 2012, 1:32 PM EDT
Location: Wide Awake Wylie, Texas
Posts: 537
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Server Error 500. Total Newbie. Ugh.

Quote:
Originally posted by paqi the black
Anybody out there see what I'm missing ?
I keep putting quarters in the jukebox but nothing's coming out.
Is the web server apache? Make sure that there is a proper alias to the CGI sub-dir. I have ran into that before.


Code:
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

Norsk: The reason for using ASCII over binary is automatic conversion from DOS to Unix formatting via FTP.
Sponsored Links
    #5  
Old 08-06-2002
paqi the black paqi the black is offline
Registered User
 
Join Date: Aug 2002
Last Activity: 6 August 2002, 6:35 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Got the problem licked.

OK. This is embarassing. But for all you other newbies out there:

I uploaded everything in ASCII (text) format. Still got the errors.
I went through all combinatorial possibilities of chmod ### on the cgi.
Still Got the errors.

I made sure that the alias was correct. Still got the errors.

What caused the error ?

I know you're all dying to know ...

The first line of the program was blank.

Duh.

The second line was my shebang #!usr/bin/perl (often #!usr/local/bin/perl).

So make sure you check that, when you're uploading a file that you've written in BBedit, notepad or just saving a file from vim, pico whatever--make sure the first line's not blank.

It will save you at least 31 hours. Of course, you'll learn a lot less if you do it right the first time.

sheepishly,

paqi
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
View the Server Total Ram in GB LinuxCommandos Shell Programming and Scripting 2 11-07-2008 05:01 AM
total newbie 12yearold Shell Programming and Scripting 2 07-11-2006 10:34 AM
Total Newbie help getting sarted... ph1ngering Shell Programming and Scripting 1 03-14-2006 08:20 PM
is this the UNIX operating system board? TOTAL NEWBIE leohutt UNIX for Dummies Questions & Answers 2 04-06-2001 11:43 AM



All times are GMT -4. The time now is 12:15 AM.