Jump to content

Search function on Windows


entschleunigung
 Share

Recommended Posts

hi,

i have a strange problem with the search since we had to move to a windows server. what worked fine before, now throws out the following error message:

Error: Exception: SQLSTATE[HY000]: General error: 3696 The regular expression contains an unclosed bracket expression.

the whole thing runs under
Windows Server 2016 (x64) EN
MySQL 8.0.15
PHP 7.2

it is the normal search.php of PW 3.0.213.
i googled a bit but couldn't find anything to help me. has anyone experienced anything like this?

 

greetings

Link to comment
Share on other sites

  • 2 weeks later...

ProcessWire currently might not be compatible with this version of MySQL as the RegEx engine is not the same between MySQL 5.x and MySQL 8.x.

Could you paste the full call-stack ?

 

Link to comment
Share on other sites

hi flydev,

Error: Exception: SQLSTATE[HY000]: General error: 3696 The regular expression contains an unclosed bracket expression. (in D:\inetpub\wwwroot\default\wire\core\PageFinder.php line 416)

#0 D:\inetpub\wwwroot\default\wire\core\Wire.php(386): ProcessWire\PageFinder->___find(Object(ProcessWire\Selectors), Array)
#1 D:\inetpub\wwwroot\default\wire\core\WireHooks.php(723): ProcessWire\Wire->_callMethod('___find', Array)
#2 D:\inetpub\wwwroot\default\wire\core\Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageFinder), 'find', Array)
#3 D:\inetpub\wwwroot\default\wire\core\PagesLoader.php(248): ProcessWire\Wire->__call('find', Array)
#4 D:\inetpub\wwwroot\default\wire\core\Pages.php(238): ProcessWire\PagesLoader->find('has_parent=1, t...', Array)
#5 D:\inetpub\wwwroot\default\wire\core\Wire.php(386): ProcessWire\Pages->___find('has_parent=1, t...', Array)
#6 D:\inetpub\wwwroot\default\wire\core\WireHooks.php(723): ProcessWire\Wire->_callMethod('___find', Array)
#7 D:\inetpub\wwwroot\default\wire\core\Wi

This error message was shown because: you are logged in as a Superuser. Error has been logged.

thanks for the moment.

 

Link to comment
Share on other sites

I tested your setup in a VM but with a Linux distribution instead of a Windows and as a result , ProcessWire run smoothly on it, even the default search feature.

I will install a Windows server today just to see if there is an extension which could mess the setup. Stay tuned..

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...
5 hours ago, entschleunigung said:

because I can't get any further here, maybe @ryan has some other idea what to do here to make the search work?

You can post an issue on github, as Ryan may not see this here in the post. But he will see it on Github!

  • Like 1
Link to comment
Share on other sites

16 hours ago, horst said:

You can post an issue on github, as Ryan may not see this here in the post. But he will see it on Github!

i have unfortunately not yet dealt with github, so far i have been able to ignore it successfully.
if someone wants to do that, i would be very grateful. 

thx

  • Haha 1
Link to comment
Share on other sites

6 minutes ago, entschleunigung said:

if someone wants to do that, i would be very grateful. 

Well, that would not be a problem at all, but don't you think this would be a good opportunity to create an account there and simply click the "new issue" button on your own (https://github.com/processwire/processwire-issues/issues) to show that you are willing to help resolving this issue? Using GIT was one the the major steps forward in the last few years for myself, so I'm quite sure you won't regret.

PS: I haven't followed this topic; I'm sorry that I can't provide any help.

  • Like 2
Link to comment
Share on other sites

  • 5 months later...
On 5/21/2019 at 8:07 AM, entschleunigung said:

 


Error: Exception: SQLSTATE[HY000]: General error: 3696 The regular expression contains an unclosed bracket expression.

 

I'm having the same issue on a CentOS build using a stack from Bitnami. I only get this error when I search with less than four characters.

Have you had any luck with discovering the bug?

Thanks,

Vivian

Link to comment
Share on other sites

@entschleunigung and/or @Vivian  Please create an issue on the processwire-issues repository on Github for this, as it needs to be looked at.

@entschleunigung If you don't have a github account, just sign up for a free account, then follow the numbered steps on this page to add the issue to the issues repository.

Thank you for your co-operation!

  • Like 2
Link to comment
Share on other sites

ryan had helped me a few weeks ago via PN. sorry that i didn't write the solution in the forum before. i hope it's no problem that i write the private message here.

Quote

MySQL's default minimum length for words in a fulltext index is 4 characters, so words under 4 characters aren't going to work unless you reduce that ft_min_word_len setting in MySQL and have it re-create the indexes. Now it doesn't usually throw an Exception, but there are a lot of settings and versions available for MySQL and MariaDB so perhaps your MySQL version or config is more strict in this regard. That's not a bad thing in this case, as it's good to know you've got a word that can't be searched. What I'd suggest doing is changing your operator from "~=" to "%=". If you need word-independent placement matches like ~=, remove your existing $sanitizer->selectorValue and you can do this:

$selector = '';
$words = explode(' ', $q); 
foreach($words as $word) {
  $selector .= "title|teaser|body%=" . $sanitizer->selectorValue($word) . ", ";
}
$selector = rtrim($selector, ", "); 

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...