I’ve been developing a new site with both a localhost and publically hosted test site. They both work as expected.
Today I uploaded the site to its production location, and for the most part it works fine. However, I have a problem with a query string stored as a SESSION variable which is garbled when retrieved.
The code on both the dev and live sites is supposed to be the same (I’ve uploaded to both from my localhost to make sure), but it seems to be working differently (I know that’s supposed to be impossible).
The $_GET query string is saved to the SESSION for later retrieval
For this example the query string was:
"?et[0]=ALL&loc[14]=SW&save=eatg&eatg=Search"
On the dev site (holidaymullandiona.com) the SESSION var looks like:-
get|s:50:"et%5B0%5D=ALL&loc%5B14%5D=SW&save=eatg&eatg=Search"
When retrieved it works fine, and returns the same data as before.
When I store the same $_GET query string on the live site (holidaymull.co.uk), it’s the same at first, but when retrieved becomes:-
get|s:66:"et%25255B0%25255D=ALL&loc%25255B14%25255D=SW&save=eatg&eatg=Search"
which when used again as a query string gives a rubbish result, of course. I’m asking myself: Where do all the ‘2525’ come from ? Is it some double encoding ?
I cannot yet work out why it should be treated differently on two sites both hosted with the same ISP (probably on the same server), with the same PHP version (5.2.9). The obvious answer would be that the code is different, and I’m constantly checking for that (so far without result).
Any other suggestions, please ?