On Fri, 14 Jul 2023 23:26:33 +0200 Peter Boy wrote:
That brought me past line 3 to the next error:
Fri Jul 14 22:38:35.479031 2023] [cgid:error] [pid 1406:tid 1496]
[client 192.168.122.158:50928]
AH01215: stderr from /var/www/html/artikel/artikel.pl:
artikel.pl: Can't locate artikel_ini.pl in @INC
(@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) at /var/www/html/artikel/artikel.pl line 12.
Line 12 is in this section:
12 require "artikel_ini.pl“;
But the file artikel_ini.pl is in the same subdir:
[root@forum-gp httpd]# ls -al /var/www/html/artikel/
total 128
drwxr-xr-x. 3 apache apache 116 Apr 6 2014 .
drwxr-xr--. 15 apache apache 4096 Aug 23 2012 ..
drwx--x---. 2 apache apache 45056 Jul 8 2021 artikel
-rwxr-xr-x. 1 apache apache 10806 Nov 17 2008 artikel.pl
-rwxr-----. 1 apache apache 165 Apr 6 2014 artikel_ini.pl
<snip>
Maybe I have to fix @INC anyhow?
I think yes.
Try to add at the beginning of artikel.pl:
--------------------------------------------------
use File::Basename;
our $REFDIR;
BEGIN {
# $REFDIR = dirname((-l $0)? readlink($0):$0);
$REFDIR = dirname($0);
}
use lib "$REFDIR" ;
--------------------------------------------------
In comment a version that will allow the script to be a symlink.
--
francis