SD Card with multiple libraries on Ethernet shield

I use the first two libraries with an SD card, but not with that library. I recommend disabling all SPI interfaces before starting any of them.

void setup() {

  // set weak pullups on D4 SD and D10 w5100
  digitalWrite(4, HIGH);
  digitalWrite(10, HIGH);

  // rest of your setup