Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-28-2010, 02:36 PM
|
#1
|
LQ Newbie
Registered: Nov 2010
Posts: 2
Rep:
|
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!!!!!
|
|
|
11-28-2010, 02:55 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
What does the server error log that it explicitly tells you to look at say?
|
|
|
11-29-2010, 04:19 AM
|
#3
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
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.
|
|
|
11-29-2010, 07:30 AM
|
#4
|
LQ Newbie
Registered: Nov 2010
Posts: 2
Original Poster
Rep:
|
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
|
|
|
11-29-2010, 07:50 AM
|
#5
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
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?
|
|
|
All times are GMT -5. The time now is 11:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|