Announcement

Collapse
No announcement yet.

PCRE support on Apache

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • seaghan
    replied
    Thanks Ed for your time,

    I'll talk to the hosting Co.

    Leave a comment:


  • Mike Sullivan
    replied
    There's no bug -- you just don't have PCRE extensions compiled in:

    './configure' '--with-apxs=/usr/sbin/apxs' '--with-xml' '--without-pcre-regex' '--with-mysql=/root/mysql'
    You'll need to get those before your vBulletin will work correctly. (You're the first server I've ever seen without them).

    Leave a comment:


  • seaghan
    replied
    Just found out some more info - (I've been searching for most of the day )

    Perhaps there is a bug in PHP4.0.4 - I found this:
    > This only applies to PHP 4.0.4 > > Back with PHP 4.0.2, I could do this: > > <?PHP > $string = "[["; > $string = preg_replace("/(\W)/", "\\\\1", $string); > ?> > > $string would then contain "\[\[". > > Now, if I use that same code, $string contains "\\1\\1\\1\\1". > > I tried to compensate for this using PHP's new ability to allow > perl syntax in the replace section. > > <?PHP > $string = "[["; > $string = preg_replace("/(\W)/", "\\$1", $string); > ?> > > That leaves $string with "\$1\$1\$1\$1". Which tells me it thought > I was backreferencing the $. So, to combat said assumption, I tried > three, four, even five slashes in front of $1, and nothing worked. > All I got were variations of "\$1\$1\$1\$1". > > I have to assume this is a bug, since this worked back in 4.0.2 which > I stopped using due to segfaults under certain circumstances. > > Ideas?

    It is indeed a bug - I fixed it in CVS version if you want to try that.

    ==================

    So perhaps I should get my host to install the CVS version or latest version or what can you recommend?? Have you seen this problem before?

    TIA

    Leave a comment:


  • seaghan
    replied
    Just some more info that may help ...

    I put a script together to show some of the factors (server variables and preg replace in particular) in the problem. This is the script:

    <? phpinfo(); ?>

    <?
    $test = 'this is the piece1 of text i am trying to change piece2';
    $pizza = "piece1|piece2|piece3|piece4|piece5|piece6";
    $test = ereg_replace($pizza,"*****",$test);
    echo $test;
    ?>

    <?
    $test = 'this is the piece1 of text i am trying to change piece2';
    $pizza = "piece1|piece2|piece3|piece4|piece5|piece6";
    $test = preg_replace($pizza,"*****",$test);
    echo $test;
    ?>

    and to see the result (ie where preg_replace does not work), see here: http://www.muinteoiri.com/vb/preg.php

    Hope this helps - TIA

    Leave a comment:


  • seaghan
    replied
    Thanks Ed for the prompt reply ...

    I am being told that I have:

    - PHP 4.04 pl1 (standard install)
    - MySQL 3.23

    the test forum is at www.muinteoiri.com/vb in case you wanted to check it out. I hope it's nothing stupid I've done with the config ... I have not edited any files directly just via control panel ..

    So any suggestions from here please?

    TIA

    P.S. I've just tried to do a post, and it's the same thing (Fatal error: Call to undefined function: preg_replace() etc.) so this prob seems to be central to effective functioning.
    Last edited by seaghan; Fri 15 Jun '01, 8:42am.

    Leave a comment:


  • Mike Sullivan
    replied
    Correct, you need to have PCRE extensions loaded in PHP (I think they were added in 3.0.9).

    Leave a comment:


  • seaghan
    started a topic PCRE support on Apache

    PCRE support on Apache

    Hi,

    I installed v2 fine but am getting errors like this:

    1. When I get vbulletin to send me a reminder-password I get:

    Fatal error: Call to undefined function: preg_replace() in /home/sites/site223/web/vb/admin/functions.php on line 1629

    2. Elsewhere I get:

    Fatal error: Call to undefined function: preg_replace() in /home/sites/site223/web/vb/admin/functions.php on line 295

    Does this seem like a PCRE problem - I can't find out exactly what version of PHP I have (know it's >3 on Linux Apache with recent MySQl, and am trying to get exact details ...)

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