Can't locate file.pl in @INC

Discussion in 'ISPConfig 3 Priority Support' started by OwnYourOwn, Feb 11, 2019 at 5:03 PM.

  1. OwnYourOwn

    OwnYourOwn Member HowtoForge Supporter

    Hello,

    Getting the following error from a perl script that I’ve used for 10 years moving it from various servers and sites without ever having any problems.

    Can't locate setup.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at search.pl line 4.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Part of "search.pl" in cgi-bin: (755)

    #!/usr/bin/perl

    use CGI::Carp "fatalsToBrowser";
    require "setup.pl";
    require "main.pl";
    push (@INC, "$homedir/");

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Part of Can’t Locate "setup.pl" in cgi-bin: (755)

    $html="/var/www/clients/client0/web2/web";

    $homedir="/var/www/clients/client0/web1/cgi-bin";

    $home="http://mysite.com";

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Site.vhost

    # cgi enabled
    <Directory /var/www/clients/client0/web1/cgi-bin>
    Require all granted
    </Directory>
    ScriptAlias /cgi-bin/ /var/www/clients/client0/web1/cgi-bin/
    <FilesMatch "\.(cgi|pl)$">
    SetHandler cgi-script
    </FilesMatch>
    # suexec enabled
    <IfModule mod_suexec.c>
    SuexecUserGroup web1 client0
    </IfModule>

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Site was working on Debian 8 - moved to Debian 9 not working.

    Any help would be appreciated

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The file setup.pl and main.pl are in the same folder that contains search.pl on the new server or in one of the folders listed in @INC ?
     
  3. OwnYourOwn

    OwnYourOwn Member HowtoForge Supporter

    Al the pl files (33) are in cgi-bin. All with permission 755 and the vhost ScriptAlias is calling up the cgi-bin so that is what I can't understand.
    and apparently it's not reading "push (@INC, "$homedir/");" which in the setu.pl is listed as "$homedir="/var/www/clients/client0/web1/cgi-bin";"
     
  4. OwnYourOwn

    OwnYourOwn Member HowtoForge Supporter

    In the old server all the pl files were in the cgi-bin as they are in the new server.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you try to compare the content of @INC between the servers. Maybe it is missing the include path '.' here. I'm not a Perl programmer, so I can't give you much details, but it seems as if the current directory is not part of the include path and in other languages like PHP, when '.' is not in include path, the files in the same directory are skipped, so this might be the case in perl as well.
     

Share This Page