Re: RE: [EXTERNAL] [BULK] Re: Internal Server Error running perl script in browser

2022-11-17 Thread René Berber

On 11/17/2022 12:57 PM, Michael Lascuola via Cygwin wrote:


Thanks for the response!  Forgive me, as I am SQL Server DBA.  Is
there another way I should check this?

$ perl -v

This is perl 5, version 32, subversion 1 (v5.32.1) built for
x86_64-cygwin-threads-multi (with 7 registered patches, see perl -V
for more detail)

Copyright 1987-2021, Larry Wall

[snip]

That is Cygwin's perl, but...

$ which perl 
/usr/local/bin/perl


That is not the same.

The first one is at /usr/bin/perl.  And your PATH correctly leads to it.

Your problem is the script, which explicitly calls the 2nd perl:

#!/usr/local/bin/perl

Try changing that line to either "#!/usr/bin/perl", or
"#!/usr/bin/env perl"
--


--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


RE: [EXTERNAL] [BULK] Re: Internal Server Error running perl script in browser

2022-11-17 Thread Michael Lascuola via Cygwin
Thanks for the response!  Forgive me, as I am SQL Server DBA.  Is there another 
way I should check this?

$ perl -v

This is perl 5, version 32, subversion 1 (v5.32.1) built for 
x86_64-cygwin-threads-multi
(with 7 registered patches, see perl -V for more detail)

Copyright 1987-2021, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.


$ which perl
/usr/local/bin/perl

-Original Message-
From: Cygwin  On Behalf Of René 
Berber
Sent: Thursday, November 17, 2022 11:52 AM
To: cygwin@cygwin.com
Subject: [EXTERNAL] [BULK] Re: Internal Server Error running perl script in 
browser

WARNING: This email originated outside of the Salina Regional Health Center 
email system.
DO NOT CLICK links or attachments unless you recognize the sender and know the 
content is safe.


On 11/17/2022 10:22 AM, Michael Lascuola via Cygwin wrote:
> 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

That is not Cygwin perl.

If you build it, or installed it from somewhere else... then its your problem, 
not a Cygwin problem.

[snip]


--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
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.


-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Internal Server Error running perl script in browser

2022-11-17 Thread René Berber

On 11/17/2022 10:22 AM, Michael Lascuola via Cygwin wrote:

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


That is not Cygwin perl.

If you build it, or installed it from somewhere else... then its your 
problem, not a Cygwin problem.


[snip]


--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Internal Server Error running perl script in browser

2022-11-17 Thread Michael Lascuola via Cygwin
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 "My First Script\n\n";
print "\n";
print "Hello from mpl.pl\n";
print "";


Here are the results:

$ perl  mpl.pl
DBMExamplePFileGoferMemODBCProxySpongeContent-type:text/html

My First Script


Hello from mpl.pl



/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.
# cygcheck -s -v -r -h > cygcheck_output.txt

Cygwin Configuration Diagnostics
Current System Time: Wed Nov 16 19:20:14 2022

Windows 2016 Server Standard Ver 10.0 Build 14393 

Running in Terminal Service session

Path:   C:\cygwin64\home\svc_dpa_sql\perl5\bin
C:\cygwin64\usr\local\bin
C:\cygwin64\bin
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0
C:\Strawberry\c\bin
C:\Strawberry\perl\site\bin
C:\Strawberry\perl\bin
C:\Program Files\PowerShell\7
C:\Users\svc_dpa_sql\AppData\Local\Microsoft\WindowsApps
.
C:\cygwin64\opt\dbamon\bin
C:\cygwin64\usr\sbin
C:\cygwin64\home\svc_dpa_sql\bin

Output from C:\cygwin64\bin\id.exe
UID: 1122295(svc_dpa_sql)
GID: 1049089(Domain Users)
1049089(Domain Users)
544(Administrators)
555(Remote Desktop Users)
545(Users)
14(REMOTE INTERACTIVE LOGON)
4(INTERACTIVE)
11(Authenticated Users)
15(This Organization)
4095(CurrentSession)
66048(LOCAL)
1094623(exactACCESS Users)
1104417(CTRX File Explorer)
1101140(SQL SA)
1105935(CTRX SRHC Users)
1078627(Citrix Users)
1095766(hciDevUsers)
1104415(CTRX HealthStream web app)
70145(Authentication authority asserted identity)
405504(High Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

Here's some environment variables that may affect cygwin:
USER = 'svc_dpa_sql'
PWD = '/home/svc_dpa_sql'
HOME = '/home/svc_dpa_sql'

Here's the rest of your environment variables:
USERDOMAIN = 'SRHC'
OS = 'Windows_NT'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
PROCESSOR_LEVEL = '6'
PSModulePath = 'C:\Program 
Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules'
CommonProgramW6432 = 'C:\Program Files\Common Files'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
TZ = 'America/Chicago'
POWERSHELL_DISTRIBUTION_CHANNEL = 'MSI:Windows Server 2016 Standard'
HOSTNAME = 'IT-SQL-DBA'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/opt/dbamon/adm/instances_test'
PERL_MB_OPT = '--install_base "/home/svc_dpa_sql/perl5"'
USERNAME = 'svc_dpa_sql'
LOGONSERVER = '\\MHS-DC1'
PROCESSOR_ARCHITECTURE = 'AMD64'
PLOTICUS_PREFABS = '/usr/share/ploticus/prefabs'