Free version not compatible to latest perl

Free version of Xfilesharing

Moderator: admin

Message
Author
adelphi
Posts: 4
Joined: Nov 22, 2011 9:59 am

Free version not compatible to latest perl

#1 Postby adelphi » Oct 25, 2017 1:07 pm

Please be aware, that XFileSharing Free doesn't work with latest linux distributions (e.g. Debian 9) because of deprecated perl function "defined(@array)".

You'll get following error:
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at Modules/CGI.pm line 506.
Compilation failed in require at Modules/Process.pm line 5.
BEGIN failed--compilation aborted at Modules/Process.pm line 5.
Compilation failed in require at /var/www/fileexchange/cgi-bin/index.cgi line 7.
BEGIN failed--compilation aborted at /var/www/fileexchange/cgi-bin/index.cgi line 7

apache log:
index.cgi: Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at Modules/CGI.pm line 506.: /var/www/fileexchange/cgi-bin/index.cgi
index.cgi: Compilation failed in require at Modules/Process.pm line 5.: /var/www/fileexchange/cgi-bin/index.cgi
index.cgi: BEGIN failed--compilation aborted at Modules/Process.pm line 5.: /var/www/fileexchange/cgi-bin/index.cgi
index.cgi: Compilation failed in require at /var/www/fileexchange/cgi-bin/index.cgi line 7.: /var/www/fileexchange/cgi-bin/index.cgi
index.cgi: BEGIN failed--compilation aborted at /var/www/fileexchange

PERL release info: http://search.cpan.org/~rjbs/perl-5.16. ... deprecated
"defined(@array) is deprecated
(D deprecated) defined() is not usually useful on arrays because it checks for an undefined scalar value. If you want to see if the array is empty, just use if (@array) { # not empty } for example."

Solution:
Modify file /cgi-bin/Modules/CGI.pm
Line 506
if (defined(@QUERY_PARAM) && !defined($initializer)) {
change to
if ((@QUERY_PARAM) && !defined($initializer)) {

admin
Site Admin
Posts: 1791
Joined: Mar 22, 2006 12:32 pm

Re: Free version not compatible to latest perl

#2 Postby admin » Oct 27, 2017 10:40 am

Better solution is to completely remove folder CGI and CGI.pm file from Modules folder.

adelphi
Posts: 4
Joined: Nov 22, 2011 9:59 am

Re: Free version not compatible to latest perl

#3 Postby adelphi » Jan 08, 2018 12:58 pm

admin wrote:Better solution is to completely remove folder CGI and CGI.pm file from Modules folder.


Doesn't work. If I remove both, the links after a file upload are not shown...


Return to “XFileSharing Free”

Who is online

Users browsing this forum: No registered users and 1 guest