open_basedir error in Low Search
I just installed Low Search. An empty template except for the example search form gives the error:
A PHP Error was encountered
Severity: Warning
Message: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/ ... /expressionengine/third_party/index.html/filters/) is not within the allowed path(s): (... /apache2/gs-bin)
Filename: libraries/Low_search_filters.php
Line Number: 236
I deleted some of the path info. I'm using EE 2.8.1.
Am I missing something basic?
Replies
Low 29 Jul 2014 13:15
Can you try and apply the fix mentioned here?
https://getsatisfaction.com/low/topic...
Bryan 30 Jul 2014 01:07
Thanks. That fixed that issue. But now a search will not show any results. Could it be related? I have a very simple (testing) template.
{exp:low_search:form result_page="imagebank/results" channel="image_bank" collection="image_bank" }
Keywords
Search
{/exp:low_search:form}
and
{exp:low_search:results query="{segment_3}" limit="10"}
{if count == 1}
{/if}
- {title}
{/if}{if count == total_results}
{if no_results}No search results{/if}
{/exp:low_search:results}
I have created a collection and given weight to a few fields. When I search for any text I know is in the entries, I get no results. I have looked around the forum and on Stackexchange and do not see any similar issue except for post where the query was pointing to the wrong segment. I don't think I have that wrong.
Am I missing a step or something? Thanks.
Low 30 Jul 2014 08:13
OK, where you made the first change in the Low_search_filters.php file, try and change the entire content of the foreach loop (that starts at line #229) to this:
That should work, even with the open_basedir restriction.As for not getting results: you have 2 filter parameters set on the Form tag (channel and collection). These should be set either to the Results tag, or added as hidden input fields inside the form. The way they are now, they have no effect.
Can you try and share your code again? GetSat strips away stuff. You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.
Also, enable template debugging and copy/paste all lines mentioning Low Search here.
Bryan 31 Jul 2014 02:15
I made the change to the code and I get this:
Severity: Notice
Message: Undefined variable: item
Filename: libraries/Low_search_filters.php
Line Number: 231
and a blank page.
I reverted back to the code edit from the other post and the search form displays but still shows no results. I tried to make the code as simple as possible:
http://pastebin.com/J0b7QXkB
The template debug output is at https://dl.dropboxusercontent.com/u/3...
The result form is at http://pastebin.com/VyGMDLJS and the template output is at https://dl.dropboxusercontent.com/u/3...
Thanks for your help.
Low 31 Jul 2014 06:50
You probably replace the entire loop, instead of just the inside of it. The loop opens on line 229, then there's an opening { below it. Everything that is contained with those {} should be replaced with the code I shared earlier. I can also do it for you, but then I'd need FTP access.
As for the no_results, I can see LS is returning entries, ie. these IDs: 509|508|510|512|513|507|503|499|500|501|502|498
They could be negated by other entry properties, like status, or their entry date is in the future, or they're expired. So try and verify if that is the case with those entries.
Bryan 1 Aug 2014 00:26
Thanks for your help. I got it working. Both were dumb mistakes on my part.