Thanks everyone, The reason the BEGIN statement was there is I don't exactly know where my error logs are and it's faster to just read the file. Plus if it wasn't a script problem the err.txt file wouldn't be created.
I'm not clear about why the script could function from the shell and not the browser. I called the person who is above the reseller that provided me with the site. The problem was the permissions were set to a wrong username by the reseller. He is just learning the ropes of hosting. I empathize with him over typos. His response time was 2 days. Now my only dilemma is do I go to his reseller for cheaper hosting.
