Internal Server Error running perl script in browser
Michael Lascuola
mlascuola@srhc.com
Thu Nov 17 16:22:07 GMT 2022
Good day!
I have an issue where I receive "Internal Server Error" when running perl scripts in the browser. Here's an example script that works OK when running from the Cygwin Terminal:
#!/usr/local/bin/perl
use DBI;
my @ary = DBI->available_drivers();
print @ary;
print "Content-type:text/html\n\n";
print "<html><head><title>My First Script</title></head>\n\n";
print "<body>\n";
print "<p>Hello from <b>mpl.pl</b></p>\n";
print "</body></html>";
Here are the results:
$ perl mpl.pl
DBMExamplePFileGoferMemODBCProxySpongeContent-type:text/html
<html><head><title>My First Script</title></head>
<body>
<p>Hello from <b>mpl.pl</b></p>
</body></html>
/var/log/httpd/error_log shows:
[Wed Nov 16 19:49:40.191277 2022] [cgi:error] [pid 26397] [client 192.168.220.164:59271] AH01215: Can't locate loadable object for module DBI in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.32 /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads /usr/share/perl5/5.32) at /usr/share/perl5/5.32/DBI.pm line 284.: /srv/www/cgi-bin/mpl.pl
[Wed Nov 16 19:49:40.191798 2022] [cgi:error] [pid 26397] [client 192.168.220.164:59271] AH01215: BEGIN failed--compilation aborted at /usr/share/perl5/5.32/DBI.pm line 284.: /srv/www/cgi-bin/mpl.pl
[Wed Nov 16 19:49:40.192094 2022] [cgi:error] [pid 26397] [client 192.168.220.164:59271] AH01215: Compilation failed in require at /srv/www/cgi-bin/mpl.pl line 2.: /srv/www/cgi-bin/mpl.pl
[Wed Nov 16 19:49:40.192408 2022] [cgi:error] [pid 26397] [client 192.168.220.164:59271] AH01215: BEGIN failed--compilation aborted at /srv/www/cgi-bin/mpl.pl line 2.: /srv/www/cgi-bin/mpl.pl
[Wed Nov 16 19:49:40.192495 2022] [cgi:error] [pid 26397] [client 192.168.220.164:59271] End of script output before headers: mpl.pl
DBI.pm is in at least 2 of the locations listed in @INC
$ ll /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads/DBI.pm
-rwxr-xr-x 1 svc_dpa_sql Domain Users 318199 Nov 17 10:18 /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads/DBI.pm*
I have reinstalled DBI, but the symptoms remain.
Enclosed is the output from cygcheck -s -v -r -h > cygcheck_output.txt and httpd.conf, if they help.
Where would you look next?
Thanks!!
IMPORTANT NOTICE AND DISCLAIMER: The information contained in this e-mail, including any attachments, is privileged, strictly confidential, and is intended only for the use of the addressee(s) indicated above. If you are not an intended recipient of this e-mail, you are strictly prohibited from reading, reviewing, using, disclosing, printing, copying or disseminating this e-mail, and are asked to (a) notify the sender only of your receipt of this e-mail, and (b) permanently delete this e-mail immediately. Thank you.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck_output.txt
URL: <https://cygwin.com/pipermail/cygwin/attachments/20221117/764f8dd5/attachment-0001.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.conf
Type: application/octet-stream
Size: 20216 bytes
Desc: httpd.conf
URL: <https://cygwin.com/pipermail/cygwin/attachments/20221117/764f8dd5/attachment-0001.obj>
More information about the Cygwin
mailing list