Little addition to this problem.
If you get no PHP warnings, but only the message that the created file is 0 bytes (and there are files created of 0 byte) then probably the path you the mysqldump exe is incorrect (like on Plesk servers for example). Look or ask the provider for the right path