Low Search, error parsing script headers
<div id="desktop-search-bar" style="display:none;">
{exp:low_search:form}
<input id="header-search-input" type="text" name="keywords" value="" placeholder="KEYWORD SEARCH" class="search-input" autocomplete="off">
<button class="searchgo">GO</button>
<a href="#" class="close right-arrows">Close</a>
{/exp:low_search:form}
</div>
Log error:
[Wed Jun 28 10:48:46.871984 2017] [proxy_fcgi:error] [pid 9928:tid 140620741928704] [client 71.36.150.100:58600] AH01070: Error parsing script headers, referer: http://www.MYDOMAIN.com/
Low Search: 4.4.5
EE: 2.11.9
Replies
Paul Larson 28 Jun 2017 15:05
Note: The above error occurred in PHP 7.0.20. If I switch to PHP 5.4.16 it works.
Low 28 Jun 2017 15:10
FWIW, Low Search for EE2 isn't officially compatible with PHP7, although that particular error message does not ring a bell, nor does it seem specifically related to LS.
Does it happen on form submit, or when you load the page with the form on it?
Does it also happen with the native search form?
Paul Larson 28 Jun 2017 15:15
Error happens on form submit.
I'm not sure we have a native search form on the site, now that you mention it.
Paul Larson 28 Jun 2017 15:18
Here is my search results template. Hate to paste 200 lines, but figured it couldn't hurt.
{if is_ajax_request}
{!-- Used for autocomplete/predictive search --}
{exp:low_search:results query="{segment_3}" collection="products|collections" keywords:inflect="yes" keywords:lang="en" keywords:match="title" keywords:mode="all" keywords:stem="yes" limit="5"}
{if count == 1}<li class="search-autocomplete-header">Top Results</li>{/if}
<li><a href="{if channel_short_name == 'collections'}{title_permalink='collections'}{if:else}{exp:gwcode_categories entry_id='{entry_id}' limit='1' excl_cat_id='58|57|59' style='linear' group_id='1|2|3' max_depth='3' last_only='yes'}/{cat_group_name_lower}/item/{complete_path}{/exp:gwcode_categories}/{url_title}{/if}">{title}</a></li>
{if low_search_no_results}<li class="search-autocomplete-empty">No results for <strong>{low_search_keywords}.</strong>
{exp:low_search:suggestions query="{segment_3}" limit="2" keywords:lang="en"}{if suggestion_count == 1}Did you mean <a href="{exp:low_search:url keywords="{suggestion}"}"><strong>{suggestion}</strong></a>? {if:else} Or <a href="{exp:low_search:url keywords="{suggestion}"}"><strong>{suggestion}</strong></a>?{/if}
{/exp:low_search:suggestions}</li>
{/if}
{/exp:low_search:results}
{if:else}
{embed="embeds/.template" page_class="page search-results container" title="Search Results for {exp:stash:keywords process='end'}"}
{if segment_3 == ""}
{redirect="404"}
{/if}
{exp:stash:breadcrumbs}
<li>
<a href="#">Search Results</a>
</li>
{/exp:stash:breadcrumbs}
{!-- Stash Product Results --}
{exp:stash:set parse_tags="yes"}
{stash:search_suggestions}
{exp:low_search:suggestions query="{segment_3}" limit="2" keywords:lang="en"}
{if suggestion_count == 1}
Did you mean to search for <a href="{exp:low_search:url keywords="{suggestion}"}"><strong>{suggestion}</strong></a>?
{if:else}
Or <a href="{exp:low_search:url keywords="{suggestion}"}"><strong>{suggestion}</strong></a>?
{/if}
{/exp:low_search:suggestions}
{/stash:search_suggestions}
{stash:products}
{exp:low_search:results category="not 0" collection="products" keywords:inflect="yes" keywords:lang="en" keywords:match="title" keywords:mode="all" keywords:stem="yes" limit="24" query="{segment_3}" paginate="bottom" uncategorized_entries="no"}
{!-- keywords:loose="both" --}
{if count == 1}
{stash:keywords}{low_search_keywords}{/stash:keywords}
{stash:product_results}{absolute_results}{/stash:product_results}
<section class="products">
<h3 class="searchalt">Products ({absolute_results})</h3>
<hr class="desktop">
<div class="row product-grid pt60">
{/if}
{if low_search_no_results}
{stash:keywords}{low_search_keywords}{/stash:keywords}
{/if}
{switch='<div class="row">|||'}
<div class="span3 col {if count == 1}first-border{/if}">
{product_photos cover_only="yes"}
<a href="{exp:gwcode_categories entry_id='{entry_id}' limit='1' excl_cat_id='58|57|59' style='linear' group_id='1|2|3' max_depth='3' last_only='yes'}/{cat_group_name_lower}/item/{complete_path}{/exp:gwcode_categories}/{url_title}" class="image"><img src="{image:url:related}"></a>
{/product_photos}
<a href="{exp:gwcode_categories entry_id='{entry_id}' limit='1' excl_cat_id='58|57|59' style='linear' group_id='1|2|3' max_depth='3' last_only='yes'}/{cat_group_name_lower}/item/{complete_path}{/exp:gwcode_categories}/{url_title}" class="title"><h5>{title}</h5></a>
{exp:playa:children}
<div class="categories"><span>Collection: </span><a href="{title_permalink=collections}" class="right-arrows">{title}</a></div>
{/exp:playa:children}
</div>
{switch='|||</div>'}
{paginate}
{stash:pagination}
{pagination_links}
<div class="pagination row">
<nav class="numbers flr">
<ul>
{page}
{if current_page}
<li class="active">{pagination_page_number}</li>
{if:else}
<li><a href="{pagination_url}">{pagination_page_number}</a></li>
{/if}
{/page}
{previous_page}
<li><a href="{pagination_url}" class="previous ir">Previous</a></li>
{/previous_page}
{next_page}
<li><a href="{pagination_url}" class="next ir">Next</a></li>
{/next_page}
</ul>
</nav>
<span>Page {current_page} of {total_pages}</span>
</div>
{/pagination_links}
{/stash:pagination}
{/paginate}
{if count == total_results}</div>
</section>{/if}
{/exp:low_search:results}
{/stash:products}
{/exp:stash:set}
{!-- Stash Related Links --}
{exp:stash:set parse="yes"}
{stash:links}
{exp:low_search:results
collection="blogs|how_to_guides"
keywords:inflect="yes" keywords:lang="en" keywords:match="title"
limit="12"
query="{segment_3}"
}
{if count == 1}
{stash:links_results}{absolute_results}{/stash:links_results}
{/if}
{if channel_short_name == "blogs"}
{categories limit="1" category_group="5"}
<div class="row search-related">
{if category_url_title == "blog"}
<div class="span10 col">
<a href="{title_permalink=blog}"><h4 class="nom ttn">{title}</h4></a>
<div class="slidetoggle" style="display:none;">
<p>{excerpt}</p>
</div>
</div>
{if:else}
<div class="span10 col">
<a href="{site_url}/about/{category_url_title}/{url_title}"><h4 class="nom ttn">{title}</h4></a>
<div class="slidetoggle" style="display:none;">
<p>{excerpt}</p>
</div>
</div>
{/if}
<div class="span2 col tar m-tal">
{if excerpt}<a href="#" class="more">Read More +</a>{/if}
</div>
</div>
{/categories}
{/if}
{if channel_short_name == "how_to_guides"}
<div class="row search-related">
<div class="span10 col">
<a href="{title_permalink=design_inspiration/how_to_guides}"><h4 class="nom ttn">{title}</h4></a>
<div class="slidetoggle" style="display:none;">
<p>{excerpt}</p>
</div>
</div>
<div class="span2 col tar m-tal">
{if excerpt}<a href="#" class="more">Read More +</a>{/if}
</div>
</div>
{/if}
{/exp:low_search:results}
{/stash:links}
{/exp:stash:set}
{!-- Stash Content --}
{exp:stash:content}
<div class="row pt60">
<div class="span6 col">
<h1 class="nom alt">Search Results</h1>
<h3 class="subhead">
Your search found
{if "{exp:stash:product_results}" > 0 AND "{exp:stash:links_results}" > 0}
{exp:math formula="{exp:stash:product_results c='1'} + {exp:stash:links_results c='1'}" parse="inward"}
{if:elseif "{exp:stash:product_results}" > 0}
{exp:stash:product_results}
{if:elseif "{exp:stash:links_results}" > 0}
{exp:stash:links_results}
{if:else}
0
{/if}
matches for “{exp:stash:keywords}.” {exp:stash:search_suggestions}
</h3>
</div>
<div class="span4 offset2 col searchwrap">
{exp:low_search:form}
<input type="text" name="keywords" value="" placeholder="KEYWORD SEARCH" class="search-input" autocomplete="off">
<button class="submit">Submit</button>
{/exp:low_search:form}
</div>
</div>
{if "{exp:stash:product_results}" > 0}
{exp:stash:products}
{exp:stash:pagination}
{/if}
{if "{exp:stash:links_results}" > 0}
<h3 class="searchalt mt60">Related Links ({exp:stash:links_results})</h3>
{exp:stash:links}
{if "{exp:stash:links_results}" > 12}
<div class="pagination row">
<a class="flr" href="{path=search/related/{segment_3}}">More Related Links</a>
</div>
{/if}
{/if}
{/exp:stash:content}
{/if}
Low 28 Jun 2017 15:19
What's the URL that shows the error? Is it the results page or the index page?
Can you try and see if the error also occurs with the native search module? I'm not 100% convinced this is limited to LS only.
Paul Larson 28 Jun 2017 16:54
http://www.zrbl-7qy6.accessdomain.com
1) Type a term in the header search box, e.g. "approved"
2) DON'T click a suggestion yet - just click "Go"
Low 28 Jun 2017 17:13
Okay. I'm not seeing a PHP error, so it's probably something else. I'm not sure how I can solve this via LS.
Googling the error seems to point at server issues:
https://stackoverflow.com/a/17626018/...
https://serverfault.com/a/421403
Maybe upgrade to PHP 7.1? Or tweak some permissions? I cannot reproduce this so it's near impossible to debug...
Paul Larson 28 Jun 2017 17:51
Didn't help that I was working WHILE you might have been reviewing.
I'm nearly certain I've isolated it to a usage of the exp:math plugin. Not LS!
Low 28 Jun 2017 20:07
Good to know.