President George W. Bush on Monday signed legislation to pay for the war operations in Iraq and Afghanistan for the rest of his presidency and beyond, hailing the 162 billion dollar plan as a rare product of bipartisan cooperation.