scriptygoddess

08 Jan, 2009

Call for help – strange search problems

Posted by: Jennifer In: Call for help|WordPress|WordPress Hacks

It's been a while since I made a plea for help on here. But this time I'm really stumped.

Here's the short story:
A brand new clean install of wordpress – no plugins, no posts even except the default post. No funky characters in the blogs name. As plain vanilla as you can get. Run a search that BEGINS with the letter "d" and it hangs.

I thought it might be a wordpress 2.7 issue, so I tried installing an older version of wordpress. Nope. Same problem.

In this case the hosting is a dedicated virtual server account with Media Temple. (for a client). I have other clients hosted on Media Temple (different accounts) that run wordpress and none of them are having this problem.

There was a workaround posted on the support forums, basically in the search form tag I changed it from this:
<form method="get" action="<?php bloginfo('url'); ?>/">
to this:
<form method="get" action="<?php bloginfo('url'); ?>/index.php">

and magically it works. But doesn't that seem kind of strange. Any other search went through fine – why the letter "d". And what's also strange is that Media Temple support reps did NOT have this problem – not unless they used a proxy server. ?!?!

8 Responses to "Call for help – strange search problems"

1 | Gary LaPointe

January 8th, 2009 at 3:21 pm

Avatar

Okay, I just checked my blog to make sure it wasn't happening…

I'd have had no guess at all with the "d" problem until you posted a solution with the extra bits on the URL. I'd say the .htaccess file but if it's a fresh install it's not that either. It's gotta be something weird with that install of the web-server or it's in the WP code that interprets the code from the .htaccess some weird rewrite in that is flipping out for some reason, something extra getting passed to it.

This might sound strange but does it happen on all browsers?

2 | Jennifer

January 8th, 2009 at 3:37 pm

Avatar

Yeah – I didn't add an hataccess file. (I did a fresh install because the client's blog – which DID have an htaccess file was doing it) so I figured if I could start at ground zero – I could get an install that WASN'T doing it (and would keep adding components (template files, plugins, etc.) until I found the cause) – but no such luck.

And if the whole thing with the "d" search isn't strange enough for you – the fact that Media Temple support reps did the "d" search fine – until they used a proxy server to connect to the website. WTH?

Someone suggested maybe it was some webalizer stat thing, but stats aren't running on the server either.

(Yes it happens on all browsers, tried, IE, and Firefox on both mac and pc, and safari on mac.)

I had called Media Temple because I was hoping they would be able to see what was happening on the server when that search was started – but they said they saw nothing out of the ordinary…. but I'm thinking that somewhere… or somehow – there's a way to see exactly what file is being called and when – what line is being processed, and when… and if nothing happens – what is the last thing that DID happen so you could at least find a trail that way… Media temple only pointed me to the support thread on wordpress with the workaround. Which is nice, I'm glad I can "fix" it that way… but I'm the type of person that likes to know WHY. This makes no sense to me.

3 | Gary LaPointe

January 8th, 2009 at 3:54 pm

Avatar

The weird proxy thing is what made me think of browsers.

Very strange…

4 | Sterling Camden

January 8th, 2009 at 6:15 pm

Avatar

If you're not rewriting the urls, then the query that gets generated should be

http://domainname.com/?s=d

What happens if you try submitting that directly in the browser?

5 | Jennifer

January 8th, 2009 at 7:10 pm

Avatar

Depending on the browser's behavior (ie. firefox won't show the url until it's gotten a response, but IE and safari will), yes that will show up in the address field – and if it doesn't – you can type it in exactly with the same result… it hangs.

6 | Ree

January 10th, 2009 at 5:32 pm

Avatar

If your host has mod_security enabled, the problem may that they have a poorly written mod_security rule. Looks like it's blocking any requests that contain "/?s=d" and come from outside servers (since Media Temple themselves didn't see the problem until they used a proxy server).

I'm no good at debugging mod_security rules, but if I'm right, Media Temple might be able to dig through their ruleset (if they have one) and figure out the problem. Good luck!

7 | Jennifer

January 10th, 2009 at 5:42 pm

Avatar

Interesting. That would make sense. Is there anyway for me to check the mod security settings via SSH?

8 | Jennifer

January 10th, 2009 at 6:55 pm

Avatar

It will be difficult at this point for me to completely resolve this as the project has been finished and handed over the client (so I can't really go back in to their control panel, or mess with any of their setting at this point) – however, I thought I would add this interesting test I did tonight just browsing their site. Yes, if I add /?s=d – it times out… BUT if I add another variable in there BEFORE that, like this /?a=d&s=d – the search runs through fine. but reverse those two: /?s=d&a=d – it hangs.

They might be calling us again to work on another project on that site for them, if so, I am going to call Media Temple and ask them about a rouge mod_security rule for "/?s=d". That would make a lot of sense.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements