The 35-year-old returns to the north-west, where he previously played for Liverpool and Crewe, having also spent time at Charlton and Tottenham before his move to Craven Cottage.
"Being able to bring Danny on board is a massive boost for everyone and I couldn't be more delighted," manager Steve Kean, preparing for life after relegation from the Barclays Premier League, told rovers.co.uk.
"His record is there for all to see. He is a model professional, who has a real hunger to keep on playing football and we are thrilled he has decided to commit his future to us.
"This is a pivotal signing for us."