monoxyde,
- go check the file permissions of your uploaded file.
- verify whether you got some Windows style line endings in your script (CRLF) and remove those with eg:
Permissions are definitely one to check as Apache (certainly if it's on *nix) is probably tighter on user permissions. Also, it may be case sensitive whereas Windows lets you get away with all sorts.
All code is untested unless otherwise stated.
All opinions expressed are my own and are intended as guidance, not gospel; please treat what I say as such and as Abigail said Think for yourself.
If in doubt ask.