No announcement yet.

Error when insert a new discussion

  • Filter
  • Time
  • Show
Clear All
new posts

  • Error when insert a new discussion

    Hello to all,

    from now on my forum version 3.8.4 patch level 2 occurred an error when you insert a new discussion.

    Warning: preg_replace () [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 176 in [path] / includes / functions_newpost.php on line 246

    The code has not been touched for months, what can I do?

  • #2
    That's an issue with your server - you need to speak to your host about this
    Vote for:

    - *Admin Settable Paid Subscription Reminder Timeframe*
    *PM - Add ability to reply to originator only*
    - Add Admin ability to auto-subscribe users to specific channel(s)
    - "Quick Route" Interface...


    • #3
      Hi Trevor,

      thank you for the reply. I contacted the hosting and tell me that everything is functioning regularly and contact VBulletin.
      I think the problem is derived by the update to version 8.21 of PCRE.
      Is there a way to solve this problem, because the hosting can't downgrade to version 8.20.


      • #4
        What version of PHP are you using?


        • #5
          The version of PHP is 5.2.17

          Today i update at the last version can I download 3.8.6 Patch level 1, but the problem is the same.

          Warning: preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 255 in [path]/includes/functions_newpost.php on line 260

          For the moment I bypassed the problem commenting preg_replace () and assigning $text = $messagetext;

          The problem is posting a new discussion, responding to a thread and sending a private message. The BBcode for the links area ON . If switch to OFF there is no problem obviously because it's bypassed.


          • #6
            The code in question looks like it is used to turn e-mail addresses into links, usually not an often used feature.


            • #7
              The code that turn e-mail addresses into links works fine. The problem is genereting by the previous preg_replace() that turn url in links. Any ideas? Thanks for your support


              • #8
                This is a shot in the dark but try changing lines 227 - 229 in the file functions_newpost.php

                PHP Code:
                        $urlSearchArray = array(            '#(^|(?<=[^_a-z0-9-=\]"\'/@]|(?<=' $taglist ')\]))((https?|ftp|gopher|news|telnet)://|www\.)((\[(?!/)|[^\s[^$`"{}<>])+)(?!\[/url|\[/img)(?=[,.!\')]*(\)\s|\)$|[\s[]|$))#siU'        


                PHP Code:
                        $urlSearchArray = array();

                $urlSearchArray[] = '#(^|(?<=[^_a-z0-9-=\]"\'/@]|(?<=' $taglist ')\]))((https?|ftp|gopher|news|telnet)://|www\.)((\[(?!/)|[^\s[^$`"{}<>])+)(?!\[/url|\[/img)(?=[,.!\')]*(\)\s|\)$|[\s[]|$))#siU'
                Save the original first in case this doesn't work.


                • #9
                  In my file this lines are 241 - 243 .

                  I tried to change these lines, but still the same error


                  • #10
                    That's weird, I l was looking at the 3.8.4 PL2 files.

                    I was afraid of the same error- What I gave you was a line they used (more or less) in VB4, thinking maybe they had something that would prevent the error- but it seems not. In my Google research I see that the PCRE library has had it share of bugs over the years, some come to light only with specific versions of PHP. In all cases I saw people solved it by either downgrading the PCRE library or changing their PHP version.


                    • #11
                      I'm running php 5.2.17 with vBulletin 3.8.7 and I am experiencing this same issue. How can I resolve this?
                      Last edited by beansbaxter; Tue 3 Jan '12, 2:11am.
                      PNW Moto


                      • #12
                        The only solution at this time is to downgrade back to PCRE 8.20. This has been logged as a bug in 8.21.


                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.