One of the php files had a space in the start of the file before any code which was causing this problem. By removing that extra space resolved the issue.
Do I need to get dedicated server.
I have unlimited space and I allocated 10000 MB space to MySql and rest goes to php.
Yes I am on Apache, I don’t know what work to do on httpd.conf , can you please refer me to any guide