View previous topic :: View next topic |
Author |
Message |
sjmonty -
Joined: 28 Jun 2018 Posts: 5
|
Posted: Fri Jan 04, 2019 8:35 am Post subject: "require" files not being found by alt Perl interp |
|
|
Q. How can I make the alternate Perl interpreter (/usr/local/bin/perl) find my cgi-lib.pl file without having the define the full path? I have hundreds of .cgi files that would have to be changed if the full path is required. I'd rather not do that and foul up all of my timestamps.
DETAILS: I have had the need again to install another version of Perl. The one provided with the OS (/usr/bin/perl) keeps giving me errors when trying to install DBD::MySQL. The alternate/new install of Perl (/usr/local/bin/perl) installs DBD::MySQL correctly when run from the command line so I would like to continue using it. However, when I point Abyss to this new Perl interpreter (/usr/local/bin/perl), my existing/working .cgi scripts can't find my local "cgi-lib.pl" file. It is called within my scripts with the "require" statement. The "cgi-lib.pl" file exists right there in the same folder as the .cgi scripts themselves (cgi-bin). When I define the full path to cgi-lib.pl, it works. Also, when I point Abyss back to the built-in Perl interpreter (/usr/bin/perl), it works fine without the full path. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Sat Jan 05, 2019 7:49 pm Post subject: Re: "require" files not being found by alt Perl in |
|
|
sjmonty,
The easiest solution is to add the location of the new module in the command line so that it becomes the first search location for requires.
To do so, edit the declaration of the Perl interpreter in Abyss Web Server and change it from:
Code: | /usr/local/bin/perl |
to
Code: | /usr/local/bin/perl -I /path/of/the/new/module |
Does this fix the problem? _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
sjmonty -
Joined: 28 Jun 2018 Posts: 5
|
Posted: Sat Jan 05, 2019 9:16 pm Post subject: Re: "require" files not being found by alt Perl in |
|
|
Thank you for the suggestion but the server gives an error at the top when entering the location of the module (after the "-I") and clicking "OK".
"Error in Interpreter: File not found"
Last edited by sjmonty on Wed Jan 09, 2019 1:57 am; edited 1 time in total |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Fri Jan 11, 2019 5:48 pm Post subject: Re: "require" files not being found by alt Perl in |
|
|
sjmonty,
All our apologies. The instructions were not correct. In the Interpreter declaration, you should set the Interpreter field to
Code: | /usr/local/bin/perl |
and the Arguments field to:
Code: | -I /path/of/the/new/module |
Needless to say that /path/of/the/new/module should be changed to the actual path of the module on your system.
If the problem persists, please send us your abyss.conf file for review to our support email. Please do not forget to add a reference to this post. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
sjmonty -
Joined: 28 Jun 2018 Posts: 5
|
Posted: Fri Jan 11, 2019 9:42 pm Post subject: Re: "require" files not being found by alt Perl in |
|
|
That worked! Thank you. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Fri Jan 18, 2019 5:25 pm Post subject: Re: "require" files not being found by alt Perl in |
|
|
sjmonty wrote: | That worked! Thank you. |
You're welcome. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
|