[ale] problems running perl scripts thru apache 2.0.52
Bob Toxen
bob at verysecurelinux.com
Fri Apr 22 01:54:03 EDT 2005
See notes below.
On Wed, Apr 20, 2005 at 01:04:26PM -0700, Eric T wrote:
> I recently compiled apache 2.0.52 and have recently
> discovered perl is no longer working. I am still using
> the redhat rpm version of perl, version 5.8.0.
> when I call perl programs thru Apache, web server
> returns "Internal Server Error" error.
> server log shows the following:
> (8)Exec format error: exec of
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This may be the key to the problem. This error is generated when the
"format" of the executable program (invoked from the exec() family
of system calls) is not supported by the kernel.
It also is possible that Apache is returning this error to suggest that
it is not supporting perl.
First, give the command:
file /var/www/etools/chocolate/html/perltest.pl
to see what type of file you're trying to invoke.
Second, try invoking it outside of Apache.
I suspect that it will run outside of Apache.
This suggests that Apache is not supporting perl for some reason.
Thus, your configuration of Apache likely is incorrect. I apologize
if this is obvious. It is possible that the new version of Apache
that you installed defaults something needed to be "OFF" rather than "ON"
to increase security.
You also might try verifying that the program (perltest.pl) is executable
(mode 755).
THEN try converting it to a shell script of the same name and see if that
works. If so then this would further indicate that it is an Apache/Perl
problem. (You could try turning off the Perl module capability and see
if it gets invoked as a non-module Perl program.)
> '/var/www/etools/chocolate/html/perltest.pl' failed
> Premature end of script headers: perltest.pl
> script runs fine from command line, eg 'perl
> perltest.pl'
> apache has the following modules compiled in:
> core.c
> mod_access.c
> mod_auth.c
> mod_include.c
> mod_log_config.c
> mod_env.c
> mod_setenvif.c
> mod_proxy.c
> proxy_connect.c
> proxy_ftp.c
> proxy_http.c
> mod_ssl.c
> prefork.c
> http_core.c
> mod_mime.c
> mod_status.c
> mod_autoindex.c
> mod_asis.c
> mod_cgi.c
> mod_negotiation.c
> mod_dir.c
> mod_imap.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_rewrite.c
> mod_so.c
> perl/apache works fine with the redhat/rpm apache
> version 2.0.46
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
Actually, Horizon Network Security's spam protection is better.
> _______________________________________________
Best regards,
Bob Toxen, CTO
Fly-By-Day Consulting, Inc.
d/b/a Horizon Network Security
"Your expert in Firewalls, Virus and Spam Filters, VPNs,
Network Monitoring, and Network Security consulting"
http://www.verysecurelinux.com [Network & Linux/Unix Security Consulting]
http://www.realworldlinuxsecurity.com [My 5* book: "Real World Linux Security"]
http://www.verysecurelinux.com/sunset.html [Sunset Computer]
bob at verysecurelinux.com (e-mail)
More information about the Ale
mailing list