Error compiling Ethernet sketch

If you are using v1.0 or later, then this is incorrect:

pinMode(4, OUTPUT); //pin selected to control
  Ethernet.begin(mac, ip, subnet, gateway);

You are activating the SD SPI interface, and the wondering why there is trash on the SPI interface.

pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
Ethernet.begin(mac,ip,dns,gateway,subnet);