I have a website which is a few years old now, it basically offers downloads.
Anyway since moving server people can not download files because its now giving a error
Based on what you said, the problem is because there is something you said to echo before you wrote the code to download. To overcome this problem you should write the code so as the echo should be written after the download code at the time the download should be get performed.
It may not always an echo, it may be some HTML tags instead of it.
Download should be the first thing to be run in any page if you want to download something from that page to clients' system.