Perl / Apache on RH9.0 not working.

Tobias Speckbacher tobias at quova.com
Mon Apr 26 18:50:05 UTC 2004


1. make sure that the permissions on the file are set correctly (755
typically)
2. make sure that the AddHandler for cgi is set should you be executing
it outside of a scriptasliased directory and that the ExecCGI option is
set for that directory.
3. if you get a 500 error, always check your error_log, it is quite
helpful.

-Tobias

-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com] On Behalf Of IS Manager
Sent: Monday, April 26, 2004 9:45 AM
To: 'General Red Hat Linux discussion list'
Subject: Perl / Apache on RH9.0 not working.

After a complete re-install of RH to v9.0 I can't get even the simplest
of perl scripts to work in Apache. If I set the bang to -w the script
will work but if it is not set then then I get this:
--------------------------------
Server error!
The server encountered an internal error and was unable to complete your
request. 
Error message: 
Premature end of script headers: hello.cgi 
If you think this is a server error, please contact the webmaster 
Error 500
[site url]
Mon 26 Apr 2004 12:36:41 PM CDT 
Apache/2.0.40 (Red Hat Linux)
---------------------------------

The script in question is this:
--------------------------------
#!/usr/bin/perl
#
print <<EOP;
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>Hello World!</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
EOP
--------------------------------

Can't get any simpler than that. So anyone know what's wrong? This is
the first time I"ve used Apache 2.0 so I'm not sure if this is an Apache
or a Perl issue.

Here is the mod_perl info from the server:
---------------------------------
Module Name: mod_perl.c 
Content handlers: yes
Configuration Phase Participation: Create Directory Config, Merge
Directory Configs, Create Server Config, Merge Server Configs
Request Phase Participation: Post-Read Request, Header Parse, Translate
Path, Check Access, Verify User ID, Verify User Access, Check Type,
Fixups, Logging 
Module Directives:
PerlSwitches - Perl Switches 
PerlModule - PerlModule 
PerlRequire - PerlRequire 
PerlOptions - Perl Options 
PerlInitHandler - Subroutine name 
PerlSetVar - PerlSetVar 
PerlAddVar - PerlAddVar 
PerlSetEnv - PerlSetEnv 
PerlPassEnv - PerlPassEnv 
<Perl - NOT YET IMPLEMENTED 
=pod - Start of POD 
=back - End of =over 
=cut - End of POD 
__END__ - Stop reading config 
PerlLoadModule - A Perl module 
PerlInterpStart - Number of Perl interpreters to start 
PerlInterpMax - Max number of running Perl interpreters 
PerlInterpMaxSpare - Max number of spare Perl interpreters 
PerlInterpMinSpare - Min number of spare Perl interpreters 
PerlInterpMaxRequests - Max number of requests per Perl interpreters 
PerlInterpScope - Scope of a Perl interpreter 
PerlSendHeader - Tell mod_perl to scan output for HTTP headers 
PerlSetupEnv - Turn setup of %ENV On or Off 
PerlHandler - Subroutine name 
PerlTaintCheck - Turn on -T switch 
PerlWarn - Turn on -w switch 
PerlProcessConnectionHandler - Subroutine name 
PerlChildInitHandler - Subroutine name 
PerlPreConnectionHandler - Subroutine name 
PerlHeaderParserHandler - Subroutine name 
PerlAccessHandler - Subroutine name 
PerlAuthenHandler - Subroutine name 
PerlAuthzHandler - Subroutine name 
PerlTypeHandler - Subroutine name 
PerlFixupHandler - Subroutine name 
PerlResponseHandler - Subroutine name 
PerlLogHandler - Subroutine name 
PerlInputFilterHandler - Subroutine name 
PerlOutputFilterHandler - Subroutine name 
PerlPostReadRequestHandler - Subroutine name 
PerlTransHandler - Subroutine name 
PerlOpenLogsHandler - Subroutine name 
PerlPostConfigHandler - Subroutine name 
Current Configuration: 
------------------------------------

Any help would be welcome.

Thanks in advance.

Paul Pettit
IT Manager / Webmaster
Consistent Computer Bargains, Inc.
http://www.ccbnpts.com


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list





More information about the redhat-list mailing list