• Resolved ksofttech

    (@ksofttech)


    Our host provider recently upgraded to PHP 5.2.8 and our WordPress page quit working. After extensive troubleshooting, it seems to be a bug in the PHP library function strstr which now “hangs” in some instances and causing WordPress to never fully render the page.

    I solved it by replacing calls to strstr (in the functions-formatting.php file – function wptexturize) with stristr.

    Hopefully this will save some folks some aggravation.

    — Paul Kabotie

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ksofttech

    (@ksofttech)

    Actually, on second look – it seems there is a problem with the WordPress code – and the old strstr() was forgiving enough to let it pass – but the new version errors out.

    Old WP code:
    } elseif (strstr($curl, ‘<code’) || strstr($curl, ‘<pre’) || strstr($curl, ‘<kbd’ || strstr($curl, ‘<style’) || strstr($curl, ‘<script’))) {

    New fixed code (moving a paren):
    } elseif (strstr($curl, ‘<code’) || strstr($curl, ‘<pre’) || strstr($curl, ‘<kbd’) || strstr($curl, ‘<style’) || strstr($curl, ‘<script’)) {

    Thread Starter ksofttech

    (@ksofttech)

    So just to clarify. I changed the code back to its original state (with the original calls to strstr()) and simply moved one parenthesis in order to solve the problem on my implementation.

    Simple fix after hours of tracking this sucker down!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress broke in PHP 5.2.8’ is closed to new replies.