Page Index Toggle Pages: [1] 2  ReplyAdd Poll Send Topic
Hot Topic (More than 10 Replies) Error "Assuming NOT a POSIX class" (Read 7563 times)
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Error "Assuming NOT a POSIX class"
Nov 2nd, 2018 at 6:03pm
Mark & QuoteQuote  
Hello

For testing i have install a clear yabb-svn-r2032-branches-2.7 ..... but when i open the Forum after installation it give me  this sytem information error message

Quote:
An  Error Has Occurred. Assuming NOT a POSIX class since there is no terminating ':' in regex; marked by <-- HERE in m/[^[:alnum <-- HERE ]]/ at Sources/LogInOut.pm line 439.


Perl-version 5.024001

lg XTC
  

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: Error "Assuming NOT a POSIX class"
Reply #1 - Nov 2nd, 2018 at 8:34pm
Mark & QuoteQuote  
Smiley  It should be
Code
Select All
[^[:alnum:]] 



The right colon is also missing in the
Code
Select All
[:alnum 

in Load.pm and Display.pm

Since the problem doesn't throw an error here, I'm guessing that newer versions of Perl don't like it when the second colon is missing from the posix class while older versions son't care.
  

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


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Error "Assuming NOT a POSIX class"
Reply #2 - Nov 3rd, 2018 at 11:34am
Mark & QuoteQuote  
Hello

Hmmm ....next problem.

When i fix your fix  Cheesy i become a software error!

Quote:
Software error:

Attempt to reload Sources/YaBBC.pm aborted.
Compilation failed in require at ./Sources/Subs.pm line 3261.


Subs.pm (line 3261)

Code (Perl)
Select All
        require Sources::YaBBC; 



  Sad

lg XTC
  

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: Error "Assuming NOT a POSIX class"
Reply #3 - Nov 3rd, 2018 at 1:32pm
Mark & QuoteQuote  
There are 5 files using the alnum posix:
Decoder, Display, Load, LogInOut, and YaBBC

In Display, Load, and LogInOut the posix has the last colon missing.

In Display the line containing the posix should be
Code
Select All
$urlname =~ s/([^[:alnum:]])/sprintf('%%%02X', ord($1))/egxsm; 



In Load it should be
Code
Select All
            s/%([[:alnum:]][[:alnum:]])/pack('C', hex($1))/egxsm; 



and in LogInOut it should be
Code
Select All
    if ( $id =~ /[^[:alnum:]]/xsm ) { 



YaBBC and Decoder has the correct posix already. (Did you just use a global find and replace?  Huh If so, you may have inadvertently broken YaBBC. )

I'm in the middle of a major database reconfiguration so I don't dare upgrade Perl to the newest version until that's done. (And it may be a while - 4000+ rows to be hand-edited.)
  

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


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Error "Assuming NOT a POSIX class"
Reply #4 - Nov 3rd, 2018 at 3:30pm
Mark & QuoteQuote  
Hi

The problem must be in the YaBBC.pm .....in this lines!

Code (Perl)
Select All
        my $reg4 =
 qr{[^"=\[\]\/:.\-(:\/\/\w+)]|[\n\b]|\&quot;|\[quote.*?\]|\[edit\]|\[highlight\]}xsm;

         $message =~
 s/([^\w"=\[\]]|[\n\b]|\&quot;|\[quote.*?\]|\[edit\]|\[highlight\]|\[
  • ]|\[td\]|\A)\\*(\w+?:\/\/(?:[\w~;:,\$\-+!*?\/=&@#%()\[\](?:<\S+?>\S+?<\/\S+?>)]+?)[.](?:[\w~.;:,\$\-+!*?\/=&@#%()\[\]\x80-\xFF]{1,})+?)/format_url($1,$2)/eigxsm; $message =~ s/($reg4|\[
  • ]|\[td\]|\A|[(])\\*(www[.][^.](?:$reg2+?)[.]$reg3+?)/format_url($1,$2)/eigxsm;


  • When i del this lines i becomes no error.

    Sorry regex is not best friend  Grin

    lg XTC
      

    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: Error "Assuming NOT a POSIX class"
    Reply #5 - Nov 3rd, 2018 at 8:34pm
    Mark & QuoteQuote  
    The 2.6.1 version of that section is :
    Code (Perl)
    Select All
            $message =~
     s/([^\w\"\=\[\]]|[\n\b]|\&quot\;|\[quote.*?\]|\[edit\]|\[highlight\]|\[\*\]|\[td\]|\A)\\*(\w+?\:\/\/(?:[\w\~\;\:\,\$\-\+\!\*\?\/\=\&\@\#\%\(\)\[\](?:\<\S+?\>\S+?\<\/\S+?\>)]+?)\.(?:[\w\~\.\;\:\,\$\-\+\!\*\?\/\=\&\@\#\%\(\)\[\]\x80-\xFF]{1,})+?)/format_url($1,$2)/eisgm;
             $message =~
     s/([^\"\=\[\]\/\:\.\-(\:\/\/\w+)]|[\n\b]|\&quot\;|\[quote.*?\]|\[edit\]|\[highlight\]|\[\*\]|\[td\]|\A|\()\\*(www\.[^\.](?:[\w\~\;\:\,\$\-\+\!\*\?\/\=\&\@\#\%\(\)\[\](?:\<\S+?\>\S+?\<\/\S+?\>)]+?)\.(?:[\w\~\.\;\:\,\$\-\+\!\*\?\/\=\&\@\#\%\(\)\[\]\x80-\xFF]{1,})+?)/format_url($1,$2)/eisgm; 
    
    


    Without the 'my $reg1', 'my $reg2', 'my $reg3', and 'my $reg4' lines.
      

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


    YaBB 2.6.0/1/11 Mods

    Posts: 174
    Location: @ustria
    Joined: Feb 12th, 2014
    Gender: Male
    Mood: Freaky
    Zodiac sign: Aquarius
    Re: Error "Assuming NOT a POSIX class"
    Reply #6 - Nov 4th, 2018 at 9:39am
    Mark & QuoteQuote  
    Hello

    Internal Server Error when i take the code from 2.6.1 version.

    Don`t know if this can help you!? When i del only this line .....

    Code (Perl)
    Select All
            $message =~
     s/([^\w"=\[\]]|[\n\b]|\&quot;|\[quote.*?\]|\[edit\]|\[highlight\]|\[
  • ]|\[td\]|\A)\\*(\w+?:\/\/(?:[\w~;:,\$\-+!*?\/=&@#%()\[\](?:<\S+?>\S+?<\/\S+?>)]+?)[.](?:[\w~.;:,\$\-+!*?\/=&@#%()\[\]\x80-\xFF]{1,})+?)/format_url($1,$2)/eigxsm;


  • .... the forum print this "system information":

    Code (Perl)
    Select All
    An Error Has Occurred. (?^msx:(?:[\w~.;:,\$\-+!*?\/=&@#%()\[\]\x80-\xFF]{1,}))+ matches null string many times in regex; marked by <-- HERE in m/((?^msx:[^"=\[\]\/:.\-(:\/\/\w+)]|[\n\b]|\"|\[quote.*?\]|\[edit\]|\[highlight\])|\[
  • ]|\[td\]|\A|[(])\\*(www[.][^.](?Sad?^msx:[\w~;:,\$\-+!*?\/=&@#%()\[\](?:<\S+?>\S+?<\/\S+?>)])+?)[.](?^msx:(?:[\w~.;:,\$\-+!*?\/=&@#%()\[\]\x80-\xFF]{1,}))+ <-- HERE ?)/ at Sources/YaBBC.pm line 570.


  • lg XTC
      

    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: Error "Assuming NOT a POSIX class"
    Reply #7 - Nov 4th, 2018 at 1:53pm
    Mark & QuoteQuote  
    Okay, I'm able to 'reproduce' the error by putting the regex into an 'if statement'. (Clunky, but according to Damien Conway all the capturing regexes really should be inside 'if statements' anyway.) This error appears to be related to some deprecated code inside one or more of the complex regexes.

    I am in the process of breaking them down to locate the errors - but it may take a while as regexes aren't my firend either.
      

    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: Error "Assuming NOT a POSIX class"
    Reply #8 - Nov 4th, 2018 at 2:22pm
    Mark & QuoteQuote  
    Okay - find all instances of 'eigxsm' (there are 5 files with it) and replace it with 'igxsm' - BUT this reveals regex errors in Subs.pm.
    So expect a lot of fixes in the SVN sometime this week.
      

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


    YaBB 2.6.0/1/11 Mods

    Posts: 174
    Location: @ustria
    Joined: Feb 12th, 2014
    Gender: Male
    Mood: Freaky
    Zodiac sign: Aquarius
    Re: Error "Assuming NOT a POSIX class"
    Reply #9 - Nov 4th, 2018 at 2:39pm
    Mark & QuoteQuote  
    Well ..... excuse the many work  Huh Tongue Wink

    lg XTC
      

    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: Error "Assuming NOT a POSIX class"
    Reply #10 - Nov 4th, 2018 at 4:05pm
    Mark & QuoteQuote  
    Not a problem - I suspected the super long and weirdly complicated regexes were at risk of being bad but put off testing them - and then forgot about it.

    Since I'm running  Perl 5.022 on my testbed, it was passing bad regex code which 5.024 obviously does no like. As I indicated, I can trigger the problem(s) by first running the regexes through an 'if' statement. (But I also currently have a really messed up 2.7 test forum on my testbed  Smiley )
      

    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: Error "Assuming NOT a POSIX class"
    Reply #11 - Nov 4th, 2018 at 7:21pm
    Mark & QuoteQuote  
    Okay - I think I've actually figured out the problem. It's not actually a bad regex BUT 5.024 is objecting to empty results on 'captures' - things picked out of the string being processed. As I indicated before, regex captures really ought to be tested for before trying to use them but 5.022 doesn't throw a hissy when it sees them.

    It looks like 5.024 throws a hissy. (So every replacement that uses a capture has to be tested for validity or you can comment out 'use warnings;' starting with Subs.pm and YaBBC.pm and see if that works. )

    Edited:
    Okay - more research. 5.022 should be throwing a hissy but my brand new 2.7 install isn't triggering the problem that's in that (really long and overly complicated) regex.

    Undo all the changes I've suggested concerning this warning/error and in Subs.pm replace sub wrap 2 (the whole function) with
    Code
    Select All
     sub wrap2 {
         my ($message) = @_;
         if ( $message =~ m/\Q<a href=\E(\S*?)(\s[^>]*)?>(\S*?)<\/a>/ixsm ) {
         $message =~
     s/\Q<a href=\E(\S*?)(\s[^>]*)?>(\S*?)<\/a>/ my ($mes,$out,$i) = ($3,q{},1); { while ($mes) { if ($mes =~ s\/^(<.+?>)\/\/) { $out .= $1; } elsif ($mes =~ s\/^(&.+?;|\[ch\d{3,}\]|.)\/\/) { last if $i > $linewrap; $i++; $out .= $1; if (!$mes) { $i--; last; } } } } "<a href=$1$2>$out" . ($i > $linewrap ? q{...} : q{}) . '<\/a>' /eigxsm;
         }
         return $message;
     } 
    
    

    Hopefully the new 'if' statement will catch the problem strings before running the rest of the regex. (That is one serious insult to a female dog of a regex. Smiley Smiley)
    « Last Edit: Nov 5th, 2018 at 2:39pm by Dandello » 
    Reason: More info 

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


    YaBB 2.6.0/1/11 Mods

    Posts: 174
    Location: @ustria
    Joined: Feb 12th, 2014
    Gender: Male
    Mood: Freaky
    Zodiac sign: Aquarius
    Re: Error "Assuming NOT a POSIX class"
    Reply #12 - Nov 6th, 2018 at 4:53pm
    Mark & QuoteQuote  
    Hi

    Have test now "new" wrap2 code ...... also/or changes "eigxsm" to "igxsm" ......but nothing works on perl version  Shocked

    lg XTC
      

    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: Error "Assuming NOT a POSIX class"
    Reply #13 - Nov 6th, 2018 at 6:20pm
    Mark & QuoteQuote  
    The 'eigxsm' was the correct one for the regexes that were using it . The 'e' evaluates the right hand section of a substitution - I admit to having got confused as that 'e' is one of the few regex modifiers that doesn't work on a match.

    Again, I can't get that regex to throw any warnings, even though it probably should. So all I can suggest at the moment is to put everything back the way it was (except for the 'alnum' fixes)  and disable 'use warnings' for Subs.pm.

    (And I don't dare upgrade to Perl 5.024 or 5.026 until my current database project is done. And considering I'm at 600 of 3200 rows, it's going to take while.)





      

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


    YaBB 2.6.0/1/11 Mods

    Posts: 174
    Location: @ustria
    Joined: Feb 12th, 2014
    Gender: Male
    Mood: Freaky
    Zodiac sign: Aquarius
    Re: Error "Assuming NOT a POSIX class"
    Reply #14 - Nov 6th, 2018 at 7:55pm
    Mark & QuoteQuote  
    Hello

    I have not update my Webspace myself ..... this  make my hosting provider.

    The YaBB 2.6.11 (XTC Support Forum) works fine ..... i have only at the use lib '.';
    line in the YaBB.pl lile.

    On my own Server runs Perl 5.018

    lg XTC
      

    Back to top
     
    IP Logged
     
    Page Index Toggle Pages: [1] 2 
    ReplyAdd Poll Send Topic
    Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
    Error "Assuming NOT a POSIX class"

    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