wzzrd is correct. This should likely be on stackoverflow, and the issue will be with the return value from json_decode not being what you expected.
From http://php.net/json_decode
Returns the value encoded in json in
appropriate PHP type. Values true,
false and null (case-insensitive) are
returned as TRUE, FALSE and NULL
respectively. NULL is returned if the
json cannot be decoded or if the
encoded data is deeper than the
recursion limit.
Are you making the same request on both servers (&data=xxx is exactly the same)? That'd be the first thing to verify.
Assuming yes, are your php.ini's similar?
magic_quotes_gpc=1
will alter $_GET/$_POST/$_COOKIE and is the likely culprit.