I'm trying to figure out why an nph- script in Perl is corrupting from the browser. This is the code:
#!/usr/bin/perl
print "Content-Type: text/plain\n\n";
print "FOO";
I name it nph-test.cgi, and then run from the browser, I get:
If I copy the exact same code, and name it test.cgi, it comes out fine:
The apache config is:
<Directory "/home/foo/web/example.org/*">
Options +ExecCGI +FollowSymLinks +MultiViews
AllowOverride AuthConfig
PerlResponseHandler ModPerl::Registry
AddHandler perl-script .cgi .pl
Options +ExecCGI
PerlOptions +ParseHeaders
AllowOverride All
Require all granted
</Directory>
What am I doing wrong?
Versions are:
Apache 2.4.18 Perl 5.22.1


mod_asis? https://httpd.apache.org/docs/current/mod/mod_asis.html – chicks Oct 18 '17 at 00:34AddHandler send-as-is cgi, rebooted Apache, and then when I run that script it downloads with the contents:1f8b 0800 0000 0000 0003 73f3 f707 00ab 27d4 1a03 0000 00– Andrew Newby Oct 18 '17 at 09:24