[thelist] moving MySQL db to new server breaks querystring contents?
John Hicks
johnlist at gulfbridge.net
Fri Jun 2 09:45:03 CDT 2006
Canfield, Joel wrote:
> moving mysql from box A, where the db was on the same box as the php
> pages, to boxes B and C, where B has the php and C has the database.
>
> domain name still points to box A, but B is available at an IP addresss
> (which I can't share 'cause I haven't yet gotten permission from the
> lead dev on this task)
>
> on box A, pages with lists of items sort just fine; column headings are
> links to
>
> page.php?sort=city
>
> for instance, which sorts the results by city, of course
>
> on box B, the code is identical except the db connection, which must be
> working 'cause the data displays. but even though the links spit the
> right URL, $sort is empty.
>
> Is this caused by some security issue with the domain name not being on
> box B, or is there some other obvious cause?
If the domain still points to A but B does the serving, then how does
the request get from A to B?
If it's something like redirecting or proxying using something like url
rewriting, then your problem is likely in that handoff process: the
query may be dropped along the way.
To debug, try displaying the full URL and query (e.g. using $_SERVER
variables in PHP). This will be what B sees.
If the query is being dropped, check your domain setup in httpd.conf
(assuming Apache) for any directives that translate the url, probably
using a regular expression.
--John
More information about the thelist
mailing list