phpld search fix after php version update

In: quick tips

19 Sep 2012

After upgrading to PHP 5.3.15, a PHP link directory search function was no longer working: Sorry, no records found that match your keyword(s).

A quick fix is to go into search.php and replace:

$pattern = array ( ‘/(AND[\s])+/’, ‘/(OR[\s])+/’, ‘/\s+/’, ‘/`+/’, ‘`^[^\w\d]`’, ‘`[^`\w\d]$`’ );

with

$pattern = array ( ‘#(AND[\s])+#i’, ‘#(OR[\s])+#i’, ‘#[\s]+#’, ‘#[`]+#’, ‘#^[^\w\d]#i’, ‘#[^`\w\d]$#i’ );

Comment Form

About

Welcome UK Business Directory the perfect place if you are looking for an UK business or service.

We run a light directory, conveniently organized, and highly alert to your needs.

Webmasters simply use the Submit button, select the most suitable category and submit your sites.

Advertising