在新服务器上格式化GET序列化数据

I had set up a demo web app on my personal server. When a user submits the info on the form, the array of info is sent through the form. It worked fine on my server. When I moved it to a new server, it no longer sends the correct information. I noticed the string is slightly different. Is there some sort of setting I need to change on the new server?

For both sites, I chose February and submitted the form.

The string that gets passed on the old server:

months=a%3A1%3A%7Bi%3A0%3Bs%3A1%3A"2"%3B%7D

The string that gets passed on the new server:

months=a%3A1%3A%7Bi%3A0%3Bs%3A1%3A%5C"2%5C"%3B%7D

The data is collected from the get with:

$months = $_GET['months'];
$dates = unserialize(urldecode($months));

The data is added to the form as a hidden field using this variable:

$dateserial = htmlspecialchars(serialize($dates));

magic_quotes_gpc is enabled in php.ini on the new server and "magically" escaping quotes with a \ which is translated into %5C by urlencode.

So turn it off.