The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
command to find out total size of a specific file size (spread over the server) abhinov SUN Solaris 3 08-08-2007 03:48 AM
grep running total/ final total across multiple files MrAd UNIX for Dummies Questions & Answers 5 05-08-2007 10:03 AM
total newbie 12yearold Shell Programming and Scripting 2 07-11-2006 07:34 AM
Total Newbie help getting sarted... ph1ngering Shell Programming and Scripting 1 03-14-2006 06:20 PM
is this the UNIX operating system board? TOTAL NEWBIE leohutt UNIX for Dummies Questions & Answers 2 04-06-2001 08:43 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-05-2002
Registered User
 

Join Date: Aug 2002
Posts: 2
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.
Forum Sponsor
  #2  
Old 08-06-2002
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
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
  #3  
Old 08-06-2002
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
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
Registered User
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 536
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.
__________________
Not quite as cool as all the other Kids...
  #5  
Old 08-06-2002
Registered User
 

Join Date: Aug 2002
Posts: 2
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
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0