开发者

Same script, working on a site, not working on the other!

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!

开发者_如何学Python

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

Thanks!


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

So in my htaccess, I added: Options -MultiViews

And problem solved!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜