Page 1 of 1

Apache quirkyness

Posted: Mon Feb 26, 2007 9:59 pm
by alex.barylski
Wasn't there an Web Server forum? I can't seem to find it?

Anyways, this is a really strange problem...but:

I've been working on a program some some time and just recently got to a section which totally choked...

Basically, there was a JavaScript window.open() but the path was in the format:

Code: Select all

www.domain.com/index.php&page=about&step=X
The above URL request on my local server chokes...I'm using Ubuntu 6.10

My client was using RedHat but it worked fine on his machine...

After countless hours of tinkering and searching thousands of lines of javascript I finally located the offending line and change the above from what it was, to this:

Code: Select all

www.domain.com/index.php?page=about&step=X
That fixed the problem and I haven't heard anything since :)

But I'm stumped, other than maybe Apache specifics or OS differences such as RedHat or Gentoo, etc...maybe Window/Linux as well...there is nothing I can think of which would allow this problem to just kinda work on his machine and yet on mine, the URL was naturally invalid.

Whats really weird, is it worked on several other client machines as well, scattered around the world, so very different hosting services, setups, etc...

Mod_rewrite was the first thing I looked for, but there was nothing of the kind, so what else should I be investigating?

Posted: Mon Feb 26, 2007 11:04 pm
by feyd
It's probably a server config thing.

Posted: Tue Feb 27, 2007 12:54 am
by Chris Corbyn
Here's my guess. One was running CGI and the other was running SAPI. Just a guess.

Posted: Tue Feb 27, 2007 12:29 pm
by alex.barylski
feyd wrote:It's probably a server config thing.
Anything in particular? :P

d11 I'm not sure what SAPI is but assume it has something to do with Windows...in anycase, thanks for the guess, but from what I can tell each environment was running as Apache extension/module. No CGI :(

Oieee...this is gonna cause a headache and a half :)

Thanks guys :)

Posted: Tue Feb 27, 2007 12:59 pm
by Kieran Huggins
maybe it's a filesystem thing... if apache doesn't see the ? it could try to locate the file "index.php&page=about&step=X" on disk, causing unknown results. What fs are you running in your install of Ubuntu?

Posted: Sat Mar 03, 2007 7:10 pm
by seodevhead
Perhaps your directory Options in your httpd.conf file was set to MultiViews, in which any invalid QUERY_STRING appendage is ignored and index.php would be served instead?

I've had this happen and it had me in wild goose chases trying to figure out what the heck was going on.

Depending on the Apache configuration, query strings only start after the initial ?...

ie. QUERY_STRING = param1=44&param2=99