Am 14.07.2023 um 19:01 schrieb Samuel Sieb <samuel(a)sieb.net>:
On 7/14/23 06:48, Peter Boy wrote:
> I have the thankless task of getting an application written with perl to run on one
of our F38 servers.
> The application was developed around 2005 or so, last changes around 2012, the
developer is long gone from the university and the colleagues whose (long term) project
use the application know nothing except how to use the finished system. It was running on
an external DomainFactory web space, which has now been terminated at short notice and I
only have the backup, no configuration information. The last time I used perl was more
than a decade ago. Those were the times.
> I installed a fresh VM as default and added https and mod_perl.
> The problem is:
> The html pages show up nicely, the perl scripts are downloaded automatically.
> The Perl scripts are scattered around in DocumentRoot and various subdirs and
sub-subdirs. So they are not all in one cgi directory.
> I faintly remember having to enable directories for Perl. I guess that mod_perl
basically already does that as usual in Fedora.
> As far as I have found information, everything is based on a dedicated cgi directory,
where all scripts are located and executed. But there must be another way, at least the
application worked a week ago as it is.
I have also not used perl on a web server for around 20 years, but I think you need to
map the file extension in a way to trigger mod_perl to handle it. For example, if you
look in the php config, you'll see this:
<FilesMatch \.(php|phar)$>
SetHandler application/x-httpd-php
</FilesMatch>
You need to find the corresponding handler for mod_perl.
Thanks, you gave me the idea what to make of several other infos I read. I added to http
configuration:
<Directory "/var/www/html“> ## that is the document root
Options +ExecCGI:q:q
AddHandler cgi-script .cgi .pl
</Directory>
And the perl script /var/www/html/artikel/article.pl got executed.
But linie 3 of the script produced the next error message:
Can't locate CGI/Carp.pm in @INC
(you may need to install the CGI::Carp module)
(@INC contains: /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5
/usr/share/perl5
The package perl-Carp is already installed (presumably as a dependency of mod_perl) and I
found
/usr/share/perl5/vendor_perl/Carp.pm
which is in the search path
Obviously, I miss something else.
Hello Perl experts, what else am I missing?
Thanks a lot in advance
--
Peter Boy
https://fedoraproject.org/wiki/User:Pboy
PBoy(a)fedoraproject.org
Timezone: CET (UTC+1) / CEST /UTC+2)
Fedora Server Edition Working Group member
Fedora Docs team contributor and board member
Java developer and enthusiast