Yes the simple php file works but there is another problem
I uploaded the simple PHP file you had provided-- and it works perfectly.
Later I checked and saw that the script which is giving 500 error requires Ioncube loader.
I copied the Ioncube files to the web folder, and when I ran the ioncube installer it gives an error that "Open_Basedir restriction is in effect"
Please let me know how to resolve this-- also this same problem will be there for a few more domains where I have to install the same Ioncube encoded script.