LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-28-2010, 02:36 PM   #1
wrender
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
perl


i can run other perl scipt from my web browser but noT this--------


#!/usr/bin/perl

use CGI':standard';

print "content-type:text/html","\n\n";

print "<html>\n";

print "<head> <title> SERVER INFORMATION </title> </head>\n";

print "<body><h1> About this server </h1>","\n";

print "<hr><pre><h3>";

print "Server name : ",$ENV{'SERVER_NAME'},"<br>";

print "Running on port : ",$ENV{'SERVER_PORT'},"<br>";

print "Server Software : ",$ENV{'SERVER_SOFTWARE'},"<br>";

print "Server protocol : ",$ENV{'SERVER_PROTOCOL'},"<br>";

print "CGI-Version : ",$ENV{'GATEWAY_INTERFACE'},"<br>";

print "Root Document : ",$ENV{'DOCUMENT_ROOT'},"<br>";

print "</h3><hr></pre>\n";

print "</body></html>\n";

exit(0);






i get this error message----



Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@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.
Apache/2.2.13 (Fedora) Server at localhost Port 80




HELP!!!!!
 
Old 11-28-2010, 02:55 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
What does the server error log that it explicitly tells you to look at say?
 
Old 11-29-2010, 04:19 AM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
It may just be formatting, but use CGI':standard'; looks like a possible syntax error. Specifically, it looks like you are missing a space between CGI and the '.

You should also make sure that you are making proper use of the $ENV variable.
 
Old 11-29-2010, 07:30 AM   #4
wrender
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
this is the error log


--------------------------------------------------------------------------------------------------------------



[Mon Nov 29 18:41:16 2010] [error] python_init: Python executable found '/usr/bin/python'.
[Mon Nov 29 18:41:16 2010] [error] python_init: Python path being used '/usr/lib/python26.zip:/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'.
[Mon Nov 29 18:41:16 2010] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Mon Nov 29 18:41:16 2010] [notice] mod_python: using mutex_directory /tmp
[Mon Nov 29 18:41:16 2010] [notice] Apache/2.2.13 (Unix) DAV/2 PHP/5.3.0 mod_python/3.3.1 Python/2.6.2 mod_ssl/2.2.13 OpenSSL/1.0.0-fips-beta3 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Mon Nov 29 18:43:12 2010] [error] [client ::1] (2)No such file or directory: exec of '/var/www/cgi-bin/7a.pl' failed
[Mon Nov 29 18:43:12 2010] [error] [client ::1] Premature end of script headers: 7a.pl
[Mon Nov 29 18:43:15 2010] [error] [client ::1] File does not exist: /var/www/html/favicon.ico
[Mon Nov 29 18:43:15 2010] [error] [client ::1] (2)No such file or directory: exec of '/var/www/cgi-bin/7a.pl' failed
[Mon Nov 29 18:43:15 2010] [error] [client ::1] Premature end of script headers: 7a.pl
 
Old 11-29-2010, 07:50 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Do you have a "'/var/www/cgi-bin/7a.pl'" and if so, are the permissions set such that your web server can read it?
 
  


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
Trying to find libmail-mbox-messageparser-perl and libmailtools-perl for Fedora 11 almac58 Linux - Software 4 11-18-2009 03:17 AM
LXer: Installing Eclipse, the Epic Perl plugin and my first Perl GUI program LXer Syndicated Linux News 0 05-08-2009 06:41 PM
RHEL4u2 perl localtime() call issues (perl & glibc) Brad.Scalio@noaa.gov Linux - Enterprise 3 01-23-2007 09:27 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 06:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration