Question: So I've gotten myself into a bit of a pickle and need assistance from StackOverflow Gods. 

We're trying to transfer a Magento site from one server (Godaddy) to another (Private Virtual Server) for the purpose of becoming a test site. 

I'm not familiar with Magento (my first mistake) but I researched migration, and I ran across an article that said all you need to transfer is the database, theme files, catalog files and skin files. 

So that's just what we did. We setup a fresh install, added the files and the site (<http://boulderfootandankle.com/apv-test/>) looks like it's got some formatting errors. We figured we could fix those after adding the database. 

As soon as we connected the database through the local.xml file, the theme changed to a generic one (I imagine a fallback) and we were locked out of the admin. 

I tried a number of the solutions offered for this very problem, which included:

1. Clearing the var/cache and var/session folders.
2. Altering the core config data values for the unsecure and secure web base urls.
3. Deleting the unsecure and secure web base urls and cookie values form the database.
4. Changing the sessions save CDATA from "files" to "db"
5. Changing the install date to the original
6. Altering the varien file

...and nothing seems to work. 

At this point, I'm just wondering if doing a fresh transfer of the site from one server to another, instead of transferring specific files into a fresh install, would work

Answer: 
`int[] SubState = State [0];` is just another reference to the `state` array and so can be changed via it as well.

What you probably want to do, is create a separate array from the `state` array like

```
int[] substate = new int[state.GetLength(0)];
state.CopyTo(substate, 0);

```
instead of

```
int[] SubState = State [0];

```

try

```
int[] SubState = new int[State[0].Length];
Array.Copy(State[0],Substate, Substate.Length)

```

So you are not simply assigning a new reference, but are actually copying the array correctly