Page Index Toggle Pages: [1] 2 3 ... 5 ReplyAdd Poll Send Topic
Very Hot Topic (More than 25 Replies) BUGS!!! (Read 17322 times)
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
BUGS!!!
May 6th, 2016 at 11:11am
Mark & QuoteQuote  
What is going to be the minimum and maximum supported version of Perl as recently on one of forums I help with I noticed old YaBB stopped loading completely because of breaking API changes...
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #1 - May 6th, 2016 at 1:28pm
Mark & QuoteQuote  
So long as c-Panel ships with Perl 5.08, that's our oldest supported Perl. I know YaBB 2.52 through 2.6+ work on Perl 5.18 but there may be a deprecation problem with RSS.pm with Perl 5.2+ (Luckily the problem appears to be in section that can be safely removed as RSS.pm will never call it.)

The problems with older versions of YaBB is mostly deprecated code, very old html and very old javascript.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #2 - May 7th, 2016 at 5:48pm
Mark & QuoteQuote  
Dandello wrote on May 6th, 2016 at 1:28pm:
So long as c-Panel ships with Perl 5.08, that's our oldest supported Perl. I know YaBB 2.52 through 2.6+ work on Perl 5.18 but there may be a deprecation problem with RSS.pm with Perl 5.2+ (Luckily the problem appears to be in section that can be safely removed as RSS.pm will never call it.)

The problems with older versions of YaBB is mostly deprecated code, very old html and very old javascript.


Cpanel says Perl version is 5.10.1, but YaBB 2.6.11 fails when it starts loading Path.pm... I tracked down the main problem and that is uninitialized variables do not default to numeric zero anymore, so a lot of code that assumes it can use uninitialized variables stopped working. Another problem is that chomping file handles that are explicitly cast as arrays is not supported anymore... If I use push inside readline loop, chomp works without giving warning.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #3 - May 7th, 2016 at 8:38pm
Mark & QuoteQuote  
cPanel can ship with 5.8.8, 5.10 or 5.16 at '/usr/bin/perl/' depending on the server OS and tech choice. The newest cPanel also comes with Perl 5.22 at '/usr/local/cpanel/3rdparty/bin/perl'

My testbed runs Activestate Perl 5.16.3
This forum's host is running 5.8.8. Plus I can change the shebang and access Perl 5.14.4 at '/usr/local/cpanel/3rdparty/bin/perl'

YaBBForum is running Perl 5.12.4

I know some things have been deprecated between 5.16 and 5.22 so I'll check to see if 5.22 supports some of the Modules I need for my testbed so I can see what warnings it throws.

Edited:
Just installed Activestate Perl 5.22.1 on my testbed. Aside from some deprecated regex issues I already knew about, YaBB 2.6.11 and YaBB 2.7.x work fine under ActivePerl 5.22.1. Therefore I suspect the problems you are seeing with Perl 5.10.1 has to do with some sort of security protocols. You don't say what server errors there are. The server errors will tell you if it's a deprecated code issue. I also cannot reproduce the @ARG in RSS.pm error with WinApache 2.22.2 on a Win7 machine. So I'm tending towards thinking this is a Win/IIS issue that I cannot test.





  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #4 - May 8th, 2016 at 12:27pm
Mark & QuoteQuote  
Dandello wrote on May 7th, 2016 at 8:38pm:
cPanel can ship with 5.8.8, 5.10 or 5.16 at '/usr/bin/perl/' depending on the server OS and tech choice. The newest cPanel also comes with Perl 5.22 at '/usr/local/cpanel/3rdparty/bin/perl'

My testbed runs Activestate Perl 5.16.3
This forum's host is running 5.8.8. Plus I can change the shebang and access Perl 5.14.4 at '/usr/local/cpanel/3rdparty/bin/perl'

YaBBForum is running Perl 5.12.4

I know some things have been deprecated between 5.16 and 5.22 so I'll check to see if 5.22 supports some of the Modules I need for my testbed so I can see what warnings it throws.



These are just some examples from errorlog.txt:
Quote:
1462647464|1462647464|84.251.212.53|Tapahtui virhe! Subroutine main::find_latest_data redefined at Sources/BoardIndex.pm line 776.||||RJL|
1462647548|1462647548|54.221.104.60|Tapahtui virhe! Use of uninitialized value $template_print_post in concatenation (.) or string at Sources/Display.pm line 1438.||1368612703|haku||
1462647624|1462647624|40.77.167.12|Tapahtui virhe! Use of uninitialized value in string eq at ./Sources/RSS.pm line 341.|RSSrecent||||
1462648040|1462648039|157.55.39.73|Tapahtui virhe! Use of uninitialized value $template_print_post in concatenation (.) or string at Sources/Display.pm line 1438.||1368612703|haku||
1462648191|1462648191|188.143.232.70|Tapahtui virhe! Use of uninitialized value in concatenation (.) or string at ./Templates/srhs/Register.template line 288.|register||||
1462648195|1462648194|188.143.232.70|Tapahtui virhe! Use of uninitialized value in concatenation (.) or string at ./Sources/Search.pm line 74.|search||||


Quote:
1462650296|1462650296|85.76.131.129|Tapahtui virhe! Value of <HANDLE> construct can be "0"; test with defined() at ./Sources/Memberlist.pm line 297.|ml|||vesa.k|


Quote:
1462652613|1462652613|91.233.116.228|Selvitt�m�t�n virhe :<br />The 'epoch' parameter ("Ei tiedossa") to DateTime::from_epoch did not pass regex check at /usr/local/lib64/perl5/DateTime.pm line 488      DateTime::from_epoch(undef, 'epoch', 'Ei tiedossa') called at Sources/DateTime.pm line 54      main::toffs('Ei tiedossa', undef) called at Sources/DateTime.pm line 177      main::timeformat('Ei tiedossa') called at Sources/BoardIndex.pm line 457      main::BoardIndex() called at YaBB.pl line 226      main::yymain() called at YaBB.pl line 171      eval {...} called at YaBB.pl line 171||||TOH|


Quote:
1462653210|1462653209|151.80.31.175|Tapahtui virhe! Use of /g modifier is meaningless in split at Sources/MediaCenter.pm line 135.||1420742338|muut_radiolaitteet||


Some warnings don't cause croak, but make some features no-op, like viewing IMs and adding or editing attachments.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #5 - May 8th, 2016 at 12:36pm
Mark & QuoteQuote  
I added "push @INC, '.';" to YaBB.pl before "push @INC, './Modules';" when using Perl 5.22.1 so it loads YaBB... Have to check if it works any better...
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #6 - May 8th, 2016 at 1:56pm
Mark & QuoteQuote  
Make sure 'use warnings' is NOT in YaBB.pl and there is no '-w' or '-W' in the shebang.  Add
Code
Select All
no warnings qw(uninitialized once redefine); 

to all the .pm and .pl files just below the copyright block. That MAY stop the warnings you're seeing. I have no idea what changes on the server may be causing YaBB to be throwing warnings to the YaBB error.log except that what's in the log tells me that warnings is turned on somehow.

For the other errors:
in MediaCenter.pm find
Code
Select All
            @media_in = split /\&/gxsm, $media_in; 

and change it to
Code
Select All
            @media_in = split /\&/xsm, $media_in; 

(Don't know when that error crept in  Embarrassed.)

The epoch time error looks like a language support issue. In BoardIndex.pm find
Code
Select All
        if (   ${ $uid . $curboard }{'lastposttime'} ne 'N/A' 

and replace with
Code
Select All
        if (   ${ $uid . $curboard }{'lastposttime'} =~ m{\A[0-9]+\Z}xsm 

(We're changing looking for NOT 'N/A' to making sure the field only contains numbers.)  I'm sure there are a lot more issues related to language support.

Unfortunately, I really have no idea what change on your server is triggering warnings. I do know it's not due to the Perl version.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #7 - May 8th, 2016 at 2:02pm
Mark & QuoteQuote  
Monni wrote on May 8th, 2016 at 12:36pm:
I added "push @INC, '.';" to YaBB.pl before "push @INC, './Modules';" when using Perl 5.22.1 so it loads YaBB... Have to check if it works any better...


I was posting and researching when you made this post - again, I can't reproduce the problems you're having using Apache 2.22 and ActivePerl 5.22.1. (Remember to make the same changes to the @INC in AdminIndex.pl)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #8 - May 8th, 2016 at 2:49pm
Mark & QuoteQuote  
Dandello wrote on May 8th, 2016 at 2:02pm:
Monni wrote on May 8th, 2016 at 12:36pm:
I added "push @INC, '.';" to YaBB.pl before "push @INC, './Modules';" when using Perl 5.22.1 so it loads YaBB... Have to check if it works any better...


I was posting and researching when you made this post - again, I can't reproduce the problems you're having using Apache 2.22 and ActivePerl 5.22.1. (Remember to make the same changes to the @INC in AdminIndex.pl)


I use ActivePerl on my home machine and it seems it has less issues than Unix stock Perl... The remaining issues I mainly noticed were how in some places proper language files were not loaded or variable substitution failed because variable was defined in different scope than it was used... So some variables were local to the scope instead of being global by default.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #9 - May 8th, 2016 at 3:29pm
Mark & QuoteQuote  
Monni wrote on May 8th, 2016 at 2:49pm:
So some variables were local to the scope instead of being global by default.


That still doesn't explain the apparent issue with running 2.6.11 under Perl 5.10 on your *nix host. (Although for 2.7 I have been cleaning up the regexes (5 different versions of the same regex is 4 too many) and going through the variable scopes - making sure that blanks and text aren't being processed as numbers, etc.)

When you have your YaBB install back on track, please post what you needed to do to get it to work.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #10 - May 8th, 2016 at 3:41pm
Mark & QuoteQuote  
Quote:
sub CreateOrderFile {
    if ( opendir HELPDIR, "$helpfile/$language/$help_area" ) {
         @contents = readdir HELPDIR;
         closedir HELPDIR;
     } elsif ( opendir HELPDIR, "$helpfile/English/$help_area" ) {
         @contents = readdir HELPDIR;
         closedir HELPDIR;
     }


     foreach ( sort { uc($a) cmp uc $b } @contents ) {
         ( $name, $extension ) = split /\./xsm, $_;
         next if $extension !~ /help/ism;
         $order_list .= "$name\n";
     }

     fopen( HELPORDER, ">$vardir/$help_area.helporder" )
       or croak(
"couldn't write order file - check permissions on $vardir and $vardir/$help_area.helporder"
       );
     print {HELPORDER} qq~$order_list~ or croak "$croak{'print'} HELPORDER";
     fclose(HELPORDER);
     return;
}


Otherwise the HelpCenter is completely empty.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #11 - May 8th, 2016 at 4:18pm
Mark & QuoteQuote  
fix going into 2.7.12 (This is one of the reasons that whole section is being reworked for 2.7 - what happens if the non-English Help files and English Help files don't match up?)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #12 - May 8th, 2016 at 9:22pm
Mark & QuoteQuote  
Dandello wrote on May 8th, 2016 at 3:29pm:
Monni wrote on May 8th, 2016 at 2:49pm:
So some variables were local to the scope instead of being global by default.


That still doesn't explain the apparent issue with running 2.6.11 under Perl 5.10 on your *nix host. (Although for 2.7 I have been cleaning up the regexes (5 different versions of the same regex is 4 too many) and going through the variable scopes - making sure that blanks and text aren't being processed as numbers, etc.)

When you have your YaBB install back on track, please post what you needed to do to get it to work.


So far commented out two lines inside if blocks that fail miserably in ModifyMessage.pm as 'regdate' is never numeric

Quote:
#               ${ $uid . $username }{'regdate'} >= $mdate


Quote:
#                ${ $uid . $username }{'regdate'} > $message[3] ||


Also all reads of line-based data now use "readline HANDLE" instead of "<HANDLE>"
and if it reads all lines, it uses
Quote:
my @arr = ();
my $var;
while (defined($var = readline HANDLE)) {
     push (@arr, $var);
}
chomp @arr;


when it opens a file and doesn't croak on failure, it actually checks the return value of fopen() and doesn't try to do anything if it doesn't return true.

I had to revert a lot of my fixes so I could upgrade to 2.6.12, so I can't make full patch containing all the edits yet...
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: BUGS!!!
Reply #13 - May 8th, 2016 at 10:38pm
Mark & QuoteQuote  
In these instances
Code
Select All
${ $uid . $username }{'regdate'}  

should be
Code
Select All
${ $uid . $username }{'regtime'}  



regtime is an Epoch number.

I'm trying to find some documentation on why and when (if?) text file contents became scalar context only and why ActivePerl 5.22.1 still allows file contents in list context if it's been deprecated.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: BUGS!!!
Reply #14 - May 8th, 2016 at 10:48pm
Mark & QuoteQuote  
In ModifyMessage.pm near end is block

Code
Select All
     for my $c ( 0 .. ( @buffer - 1 ) ) {
         if ( ( split /\|/xsm, $buffer[$a], 6 )[4] < $newthreadline[4] ) {
             splice @buffer, $c, 0, join( q{|}, @newthreadline ) . "\n";
             $inserted = 1;
             last;
         }
     }
  



Perl says $a is invalid in this context, should it be $c instead?

In Register.template there is variable $field{'comment'}, but the declaration is out of scope.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 5
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
BUGS!!!

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry