LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-25-2010, 07:37 PM   #1
ranvir03
LQ Newbie
 
Registered: Sep 2010
Posts: 19

Rep: Reputation: 0
Smile how to solve 500 internal server error in ubuntu


hello friends/sir ,
i'm using ubuntu 9.10,& try to run simple script in
http://localhost/cgi-bin/myscript
but showing error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

what is possiblity about this problem?
thank you
 
Old 11-25-2010, 08:10 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
"Server error 500" is a VERY generic error. The root cause can be almost anything.

SUGGESTIONS:
1. Try to reproduce the problem in a short, "hello world" CGI script

2. Look in your server's error log (for example, /var/log/apache2/error_log)

3. Cut/paste the complete script and the exact error message
 
Old 11-26-2010, 04:42 PM   #3
ranvir03
LQ Newbie
 
Registered: Sep 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by paulsm4 View Post
"Server error 500" is a VERY generic error. The root cause can be almost anything.

SUGGESTIONS:
1. Try to reproduce the problem in a short, "hello world" CGI script

2. Look in your server's error log (for example, /var/log/apache2/error_log)

3. Cut/paste the complete script and the exact error message
i'm creating a simple html script and copy into cgi-bin directory......
& this is error message sir,
[Sat Nov 27 16:12:38 2010] [error] [client ::1] (13)Permission denied: exec of '/usr/lib/cgi-bin/testing.html' failed

thank you

Last edited by ranvir03; 11-26-2010 at 04:44 PM.
 
Old 11-28-2010, 08:25 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Yup: this will result in an "Error 500" alright :
Quote:
[Sat Nov 27 16:12:38 2010] [error] [client ::1] (13)Permission denied: exec of '/usr/lib/cgi-bin/testing.html' failed
Soooo ....

1. Make sure you have read and execute permissions set
EXAMPLE: chmod +rx /usr/lib/cgi-bin/testing.html

2. Make sure you've got a legal CGI script or program
<= "testing.html" sounds like an HTML file ... NOT a CGI executable

3. Q: What is a "legal CGI script or program"?
A: I'm glad you asked

Look at some of these links:

http://www.yolinux.com/TUTORIALS/Lin...ellScript.html

http://www.bin-co.com/perl/tutorial/

http://www.cs.virginia.edu/~lab2q/lesson_1/
<= Three different CGI examples, in three different languages(shell, Perl and Python, respectively)

'Hope that helps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
500 Internal Server Error Nagesh sheregar Linux - General 2 08-14-2009 01:52 AM
Getting 500 Internal Server Error !! Deepaks Linux - Server 0 04-11-2009 06:49 AM
500 Internal Server Error shahz Red Hat 9 03-31-2009 03:05 AM
500 Internal server error fa_khan50 Linux - Newbie 0 01-02-2008 12:13 AM
500 Internal Server Error bship Linux - Software 5 01-19-2007 04:48 PM


All times are GMT -5. The time now is 05:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration