Perl error: Can't locate XFileConfig.pm in @INC XFileSharing 2.5
I am trying to install XFileSharing 2.5.
I am using Debian 8 64bit
I installed apache2, mod_perl, activated mod_rewrite etc.. The cgi-bin location is in : /usr/lib/cgi-bin (folder where perl scripts running)
And i have the /var/www/html (folder with HTML files)
I'm following these instructions: https://pastebin.com/47vARv60
I am on the "2) Set install.cgi permissions to 755. Then open it in your browser (eg server.com/cgi-bin/install.cgi)" Problems start here.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator at webmaster@localhost to inform them
of the time this error occurred, and the actions you performed just before
this error.
More information about this error may be available in the server error log.
So I went to apache logs to see what's going on.
And this is the error "[Sat Jul 29 18:54:06.695645 2017] [:error] [pid 18153:tid 140636055983872] Can't locate XFileConfig.pm in @INC (you may need to install the XFileConfig module) (@INC contains: . /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl /etc/apache2) at /usr/lib/cgi-bin/install.cgi line 4.nBEGIN failed--compilation aborted at /usr/lib/cgi-bin/install.cgi line 4.n"
It seems that can not find the XFileConfig.pm but the file exist.
root@Server:~# updatedb
root@Server:~# locate XFileConfig.pm
/usr/lib/cgi-bin/XFileConfig.pm
The file is in "/usr/lib/cgi-bin/XFileConfig.pm" The install.cgi file is in /usr/lib/cgi-bin/install.cgi.
Why seems cant find the file?? Here is the install.cgi code. https://pastebin.com/LHjcSEDK
I've spent hours and hours trying to figure it out.
So I decided to come here to see if someone smarter than I could help me.
The script is buggy. It incorrectly assumes the current directory is set to the directory in which the script resides. To fix this, replace
use lib '.';
with
use FindBin qw( $RealBin );
use lib $RealBin;
Most likely that's because you're running it with mod_perl handler. XFilesharing Pro must run under regular CGI environment. Try to disable mod_perl - that should solve your problem.
链接地址: http://www.djcxy.com/p/19078.html