views:

49

answers:

2

Hello,

First of all I apologize in advance for this question, a bit off the rang of stackoverflow, but I've spend a day trying to solve that issue and I'm totally stuck.

The issue: The search function of my script (php) works perfectly fine on one host but not on the other. If you search something here : edu-cafe.com, you'll get a result, just as it should be. However, try a search on this site, hosted somewhere else : code-reduc.com, exact same script, files and datable, and it just hang.

I've asked both the host and the original programmer of the script to look at the issue but they can't seem to find an answer...

Obviously the cause of my troubles comes from the Host, but I can't find the issue

Any bit of help would be hugely appreciated!

PS: part of the script here: http://codepaste.net/fuymqn

Thanks!

+2  A: 

The problem on the other server is that the redirect never occurs.

Do an echo of the header like this;

$location = base_url."search/".$qry_post."/";
header ( "Location:". $location ) ;

This will make your code say "headers already sent blablabla", or you have your error reporting turned off ?

Maybe something is outputted before the location header and makes it useless but not reporting errors because they're suppressed or something? I'd say your mod_rewrite isn't working on the second server, but it actually is, that's not the problem.

Kemo
Thanks. I do have error reporting, but nothing comes up if I do an echo.What I found is that if I turn off the mod_rewrite on the site that does work, I get an infinite loop and this urlhttp://www.codes-reduc.com/search_query/base_urlsearch/test/base_urlAnd on the site/host that doesn't work I get:Error 404 http://www.codes-reduc.com/search_query/ (which is what I should get!)So problem happens before the mod_rewrite I guess...
Tioneb
+3  A: 

I found the answer... My web host had the multiviews option on my default (and of course they never mentioned that to me)

So in my htaccess, I added: Options -MultiViews

And problem solved!

Tioneb
Good going on answering your own question. Make sure you mark this as your answer @Tioneb.
Mark Tomlin