I had a problem like that quite some time ago. This may not be the same thing though, just a thought. I was creating and testing my scripts on a windows box (unfortunately). The problem was that I was uploading them to a linux box. The line endings from windows caused compilation errors. After replacing the bogus windows line termination characters, everything worked fine. Again, this may not be the problem at all (since you didn't specify the OS of the development or production machines), it's just a thought.